This test fails reliably on my OS X machine when not connected to the internets, with a failure of
`create_connection(('127.0.0.1', 0)):
_______________________________________________________________________ ERROR at setup of TestWebProfile.test_main _______________________________________________________________________
> lambda: ihook(item=item, **kwds),
when=when,
)
/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:306:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
lib/python3.8/site-packages/astropy/samp/tests/test_web_profile.py:51: in setup_method
self.client2.connect(web_port=self.hub._web_port, pool_size=2)
lib/python3.8/site-packages/astropy/samp/tests/web_profile_test_helpers.py:263: in connect
self.hub.connect(pool_size, web_port=web_port)
lib/python3.8/site-packages/astropy/samp/tests/web_profile_test_helpers.py:57: in connect
self.ping()
lib/python3.8/site-packages/astropy/samp/hub_proxy.py:111: in ping
return self._samp_hub.ping()
lib/python3.8/site-packages/astropy/samp/utils.py:62: in __call__
response = function(*args, **kwrds)
/sw/lib/python3.8/xmlrpc/client.py:1109: in __call__
return self.__send(self.__name, args)
/sw/lib/python3.8/xmlrpc/client.py:1450: in __request
response = self.__transport.request(
/sw/lib/python3.8/xmlrpc/client.py:1153: in request
return self.single_request(host, handler, request_body, verbose)
/sw/lib/python3.8/xmlrpc/client.py:1165: in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
/sw/lib/python3.8/xmlrpc/client.py:1278: in send_request
self.send_content(connection, request_body)
/sw/lib/python3.8/xmlrpc/client.py:1308: in send_content
connection.endheaders(request_body)
/sw/lib/python3.8/http/client.py:1225: in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
/sw/lib/python3.8/http/client.py:1004: in _send_output
self.send(msg)
/sw/lib/python3.8/http/client.py:944: in send
self.connect()
/sw/lib/python3.8/http/client.py:915: in connect
self.sock = self._create_connection(
/sw/lib/python3.8/socket.py:807: in create_connection
raise err
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
address = ('127.0.0.1', 0), timeout = <object object at 0x10e2c99d0>, source_address = None
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
"""Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
A host of '' or port 0 tells the OS to use the default.
"""
host, port = address
err = None
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
af, socktype, proto, canonname, sa = res
sock = None
try:
sock = socket(af, socktype, proto)
if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
sock.settimeout(timeout)
if source_address:
sock.bind(source_address)
> sock.connect(sa)
E OSError: [Errno 49] Can't assign requested address
/sw/lib/python3.8/socket.py:796: OSError
--------------------------------------------------------------------------------- Captured stdout setup ----------------------------------------------------------------------------------
INFO: Hub started [astropy.samp.hub]
--------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------
WARNING: Port 0 already in use. Impossible to run the Hub with Web Profile support. [astropy.samp.hub]
--- Logging error ---
Traceback (most recent call last):
File "/sw/lib/python3.8/site-packages/astropy/samp/hub.py", line 262, in _start_web_profile_server
self._web_profile_server = WebProfileXMLRPCServer(
File "/sw/lib/python3.8/site-packages/astropy/samp/web_profile.py", line 139, in __init__
ThreadingXMLRPCServer.__init__(self, addr, log, requestHandler,
File "/sw/lib/python3.8/site-packages/astropy/samp/standard_profile.py", line 139, in __init__
SimpleXMLRPCServer.__init__(self, addr, requestHandler,
File "/sw/lib/python3.8/xmlrpc/server.py", line 605, in __init__
socketserver.TCPServer.__init__(self, addr, requestHandler, bind_and_activate)
File "/sw/lib/python3.8/socketserver.py", line 452, in __init__
self.server_bind()
File "/sw/lib/python3.8/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/sw/lib/python3.8/logging/__init__.py", line 1081, in emit
msg = self.format(record)
File "/sw/lib/python3.8/logging/__init__.py", line 925, in format
return fmt.format(record)
File "/sw/lib/python3.8/site-packages/_pytest/logging.py", line 70, in format
return super().format(record)
File "/sw/lib/python3.8/logging/__init__.py", line 664, in format
record.message = record.getMessage()
File "/sw/lib/python3.8/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "<stdin>", line 1, in <module>
File "/sw/lib/python3.8/site-packages/astropy/tests/runner.py", line 266, in test
return runner.run_tests(**kwargs)
File "/sw/lib/python3.8/site-packages/astropy/tests/runner.py", line 611, in run_tests
return super().run_tests(**kwargs)
File "/sw/lib/python3.8/site-packages/astropy/tests/runner.py", line 248, in run_tests
return pytest.main(args=args, plugins=plugins)
File "/sw/lib/python3.8/site-packages/_pytest/config/__init__.py", line 91, in main
ret = config.hook.pytest_cmdline_main(
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 233, in pytest_cmdline_main
return wrap_session(config, _main)
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 196, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 240, in _main
config.hook.pytest_runtestloop(session=session)
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 264, in pytest_runtestloop
item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 92, in pytest_runtest_protocol
self.runner.pytest_runtest_protocol(item, nextitem)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 81, in pytest_runtest_protocol
runtestprotocol(item, nextitem=nextitem)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 90, in runtestprotocol
rep = call_and_report(item, "setup", log)
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 129, in call_and_report
call = self.call_runtest_hook(item, when, **kwds)
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 305, in call_runtest_hook
call_info = getattr(CallInfo, "from_call", CallInfo)(
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 229, in from_call
result = func()
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 306, in <lambda>
lambda: ihook(item=item, **kwds),
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 119, in pytest_runtest_setup
item.session._setupstate.prepare(item)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 359, in prepare
col.setup()
File "/sw/lib/python3.8/site-packages/_pytest/python.py", line 1449, in setup
fixtures.fillfixtures(self)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 293, in fillfixtures
request._fillfixtures()
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 472, in _fillfixtures
item.funcargs[argname] = self.getfixturevalue(argname)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 482, in getfixturevalue
return self._get_active_fixturedef(argname).cached_result[0]
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 498, in _get_active_fixturedef
self._compute_fixture_value(fixturedef)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 579, in _compute_fixture_value
fixturedef.execute(request=subrequest)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 908, in execute
return hook.pytest_fixture_setup(fixturedef=self, request=request)
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 957, in pytest_fixture_setup
result = call_fixture_func(fixturefunc, request, kwargs)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 783, in call_fixture_func
res = next(it)
File "/sw/lib/python3.8/site-packages/_pytest/python.py", line 756, in xunit_setup_method_fixture
_call_with_optional_argument(func, method)
File "/sw/lib/python3.8/site-packages/_pytest/python.py", line 669, in _call_with_optional_argument
func(arg)
File "/sw/lib/python3.8/site-packages/astropy/samp/tests/test_web_profile.py", line 43, in setup_method
self.hub.start()
File "/sw/lib/python3.8/site-packages/astropy/samp/hub.py", line 389, in start
self._start_web_profile_server()
File "/sw/lib/python3.8/site-packages/astropy/samp/hub.py", line 270, in _start_web_profile_server
log.warning("Port {} already in use. Impossible to run the "
File "/sw/lib/python3.8/logging/__init__.py", line 1446, in warning
self._log(WARNING, msg, args, **kwargs)
File "/sw/lib/python3.8/logging/__init__.py", line 1577, in _log
self.handle(record)
File "/sw/lib/python3.8/logging/__init__.py", line 1587, in handle
self.callHandlers(record)
File "/sw/lib/python3.8/logging/__init__.py", line 1649, in callHandlers
hdlr.handle(record)
File "/sw/lib/python3.8/logging/__init__.py", line 950, in handle
self.emit(record)
File "/sw/lib/python3.8/site-packages/_pytest/logging.py", line 301, in emit
logging.StreamHandler.emit(self, record)
Message: 'Port 0 already in use. Impossible to run the Hub with Web Profile support.'
Arguments: (<class 'astropy.samp.errors.SAMPWarning'>,)
----------------------------------------------------------------------------------- Captured log setup -----------------------------------------------------------------------------------
INFO astropy:hub.py:402 Hub started
___________________________________________________________________ ERROR at setup of TestWebProfile.test_web_profile ____________________________________________________________________
self = <astropy.samp.tests.test_web_profile.TestWebProfile object at 0x128cc2cd0>
method = <bound method TestWebProfile.test_web_profile of <astropy.samp.tests.test_web_profile.TestWebProfile object at 0x128cc2cd0>>
def setup_method(self, method):
self.dialog = AlwaysApproveWebProfileDialog()
t = threading.Thread(target=self.dialog.poll)
t.start()
self.tmpdir = tempfile.mkdtemp()
lockfile = os.path.join(self.tmpdir, '.samp')
self.hub = SAMPHubServer(web_profile_dialog=self.dialog,
lockfile=lockfile,
web_port=0, pool_size=1)
self.hub.start()
self.client1 = SAMPIntegratedClient()
self.client1.connect(hub=self.hub, pool_size=1)
self.client1_id = self.client1.get_public_id()
self.client1_key = self.client1.get_private_key()
self.client2 = SAMPIntegratedWebClient()
> self.client2.connect(web_port=self.hub._web_port, pool_size=2)
lib/python3.8/site-packages/astropy/samp/tests/test_web_profile.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
lib/python3.8/site-packages/astropy/samp/tests/web_profile_test_helpers.py:263: in connect
self.hub.connect(pool_size, web_port=web_port)
lib/python3.8/site-packages/astropy/samp/tests/web_profile_test_helpers.py:57: in connect
self.ping()
lib/python3.8/site-packages/astropy/samp/hub_proxy.py:111: in ping
return self._samp_hub.ping()
lib/python3.8/site-packages/astropy/samp/utils.py:62: in __call__
response = function(*args, **kwrds)
/sw/lib/python3.8/xmlrpc/client.py:1109: in __call__
return self.__send(self.__name, args)
/sw/lib/python3.8/xmlrpc/client.py:1450: in __request
response = self.__transport.request(
/sw/lib/python3.8/xmlrpc/client.py:1153: in request
return self.single_request(host, handler, request_body, verbose)
/sw/lib/python3.8/xmlrpc/client.py:1165: in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
/sw/lib/python3.8/xmlrpc/client.py:1278: in send_request
self.send_content(connection, request_body)
/sw/lib/python3.8/xmlrpc/client.py:1308: in send_content
connection.endheaders(request_body)
/sw/lib/python3.8/http/client.py:1225: in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
/sw/lib/python3.8/http/client.py:1004: in _send_output
self.send(msg)
/sw/lib/python3.8/http/client.py:944: in send
self.connect()
/sw/lib/python3.8/http/client.py:915: in connect
self.sock = self._create_connection(
/sw/lib/python3.8/socket.py:807: in create_connection
raise err
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
address = ('127.0.0.1', 0), timeout = <object object at 0x10e2c99d0>, source_address = None
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
"""Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
A host of '' or port 0 tells the OS to use the default.
"""
host, port = address
err = None
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
af, socktype, proto, canonname, sa = res
sock = None
try:
sock = socket(af, socktype, proto)
if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
sock.settimeout(timeout)
if source_address:
sock.bind(source_address)
> sock.connect(sa)
E OSError: [Errno 49] Can't assign requested address
/sw/lib/python3.8/socket.py:796: OSError
--------------------------------------------------------------------------------- Captured stdout setup ----------------------------------------------------------------------------------
INFO: Hub started [astropy.samp.hub]
--------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------
WARNING: Port 0 already in use. Impossible to run the Hub with Web Profile support. [astropy.samp.hub]
--- Logging error ---
Traceback (most recent call last):
File "/sw/lib/python3.8/site-packages/astropy/samp/hub.py", line 262, in _start_web_profile_server
self._web_profile_server = WebProfileXMLRPCServer(
File "/sw/lib/python3.8/site-packages/astropy/samp/web_profile.py", line 139, in __init__
ThreadingXMLRPCServer.__init__(self, addr, log, requestHandler,
File "/sw/lib/python3.8/site-packages/astropy/samp/standard_profile.py", line 139, in __init__
SimpleXMLRPCServer.__init__(self, addr, requestHandler,
File "/sw/lib/python3.8/xmlrpc/server.py", line 605, in __init__
socketserver.TCPServer.__init__(self, addr, requestHandler, bind_and_activate)
File "/sw/lib/python3.8/socketserver.py", line 452, in __init__
self.server_bind()
File "/sw/lib/python3.8/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/sw/lib/python3.8/logging/__init__.py", line 1081, in emit
msg = self.format(record)
File "/sw/lib/python3.8/logging/__init__.py", line 925, in format
return fmt.format(record)
File "/sw/lib/python3.8/site-packages/_pytest/logging.py", line 70, in format
return super().format(record)
File "/sw/lib/python3.8/logging/__init__.py", line 664, in format
record.message = record.getMessage()
File "/sw/lib/python3.8/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "<stdin>", line 1, in <module>
File "/sw/lib/python3.8/site-packages/astropy/tests/runner.py", line 266, in test
return runner.run_tests(**kwargs)
File "/sw/lib/python3.8/site-packages/astropy/tests/runner.py", line 611, in run_tests
return super().run_tests(**kwargs)
File "/sw/lib/python3.8/site-packages/astropy/tests/runner.py", line 248, in run_tests
return pytest.main(args=args, plugins=plugins)
File "/sw/lib/python3.8/site-packages/_pytest/config/__init__.py", line 91, in main
ret = config.hook.pytest_cmdline_main(
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 233, in pytest_cmdline_main
return wrap_session(config, _main)
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 196, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 240, in _main
config.hook.pytest_runtestloop(session=session)
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/main.py", line 264, in pytest_runtestloop
item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 92, in pytest_runtest_protocol
self.runner.pytest_runtest_protocol(item, nextitem)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 81, in pytest_runtest_protocol
runtestprotocol(item, nextitem=nextitem)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 90, in runtestprotocol
rep = call_and_report(item, "setup", log)
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 129, in call_and_report
call = self.call_runtest_hook(item, when, **kwds)
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 305, in call_runtest_hook
call_info = getattr(CallInfo, "from_call", CallInfo)(
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 229, in from_call
result = func()
File "/sw/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 306, in <lambda>
lambda: ihook(item=item, **kwds),
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 119, in pytest_runtest_setup
item.session._setupstate.prepare(item)
File "/sw/lib/python3.8/site-packages/_pytest/runner.py", line 359, in prepare
col.setup()
File "/sw/lib/python3.8/site-packages/_pytest/python.py", line 1449, in setup
fixtures.fillfixtures(self)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 293, in fillfixtures
request._fillfixtures()
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 472, in _fillfixtures
item.funcargs[argname] = self.getfixturevalue(argname)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 482, in getfixturevalue
return self._get_active_fixturedef(argname).cached_result[0]
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 498, in _get_active_fixturedef
self._compute_fixture_value(fixturedef)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 579, in _compute_fixture_value
fixturedef.execute(request=subrequest)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 908, in execute
return hook.pytest_fixture_setup(fixturedef=self, request=request)
File "/sw/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/sw/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/sw/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 957, in pytest_fixture_setup
result = call_fixture_func(fixturefunc, request, kwargs)
File "/sw/lib/python3.8/site-packages/_pytest/fixtures.py", line 783, in call_fixture_func
res = next(it)
File "/sw/lib/python3.8/site-packages/_pytest/python.py", line 756, in xunit_setup_method_fixture
_call_with_optional_argument(func, method)
File "/sw/lib/python3.8/site-packages/_pytest/python.py", line 669, in _call_with_optional_argument
func(arg)
File "/sw/lib/python3.8/site-packages/astropy/samp/tests/test_web_profile.py", line 43, in setup_method
self.hub.start()
File "/sw/lib/python3.8/site-packages/astropy/samp/hub.py", line 389, in start
self._start_web_profile_server()
File "/sw/lib/python3.8/site-packages/astropy/samp/hub.py", line 270, in _start_web_profile_server
log.warning("Port {} already in use. Impossible to run the "
File "/sw/lib/python3.8/logging/__init__.py", line 1446, in warning
self._log(WARNING, msg, args, **kwargs)
File "/sw/lib/python3.8/logging/__init__.py", line 1577, in _log
self.handle(record)
File "/sw/lib/python3.8/logging/__init__.py", line 1587, in handle
self.callHandlers(record)
File "/sw/lib/python3.8/logging/__init__.py", line 1649, in callHandlers
hdlr.handle(record)
File "/sw/lib/python3.8/logging/__init__.py", line 950, in handle
self.emit(record)
File "/sw/lib/python3.8/site-packages/_pytest/logging.py", line 301, in emit
logging.StreamHandler.emit(self, record)
Message: 'Port 0 already in use. Impossible to run the Hub with Web Profile support.'
Arguments: (<class 'astropy.samp.errors.SAMPWarning'>,)
----------------------------------------------------------------------------------- Captured log setup -----------------------------------------------------------------------------------
INFO astropy:hub.py:402 Hub started
Description
This test fails reliably on my OS X machine when not connected to the internets, with a failure of
`create_connection(('127.0.0.1', 0)):
Expected behavior
I did not expect network-related failures with
remote_data=Falseset, so first thought this should have been markedremote_data()in some way, but since it is in fact trying to connect to a local address, maybe this is rather a quirk of OS X's lookup procedure.Actual behavior
Steps to Reproduce
System Details
Same on 3.6.9 and 3.7.5: