Hi, I am showing some tests are falling with python-url-normalize-1.4.3. Investigating working in progress. Some hint will be appreciated.
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo Make:46] python-tomli-1.2.3-1 python-pep517-0.12.0-4 python-build-0.7.0-4 python-install-0.0.3-3 python-msgpack-1.0.3-1 python-urllib3-1.26.7-5 python-chardet-4.0.0-5 python-idna-3.3-3 python-requests-2.26.0-5 python-cachecontrol-1:0.12.6-4 python-cachy-0.3.0-6 python-crashtest-0.3.1-5 python-pastel-0.2.1-3 python-pylev-1.4.0-4 python-typing_extensions-4.0.1-1 python-clikit-0.6.2-5 python-cleo-0.8.1-4 python-webencodings-0.5.1-9 python-html5lib-1.1-11 python-entrypoints-0.3-8 python-ply-3.11-10 python-pycparser-2.21-3 python-cffi-1.15.0-3 python-cryptography-36.0.1-1 python-jeepney-0.7.1-3 python-secretstorage-3.3.1-3 python-keyring-23.4.0-1 python-lockfile-0.12.2-11 python-ptyprocess-0.7.0-4 python-pexpect-4.8.0-6 python-pkginfo-1.7.1-3 python-pyrsistent-0.18.0-3 python-jsonschema-3.2.0-6 python-lark-parser-0.12.0-1 python-tomlkit-0.8.0-1 python-poetry-core-1.0.7-3 python-requests-toolbelt-0.9.1-7 python-shellingham-1.4.0-4 python-platformdirs-2.4.1-1 python-distlib-0.3.4-1 python-filelock-3.4.0-3 python-virtualenv-20.11.0-1 python-poetry-1.1.12-3 python-coverage-6.1.1-3 python-pytest-cov-2.12.1-6 python-pytest-socket-0.5.0-1
[Aur:1] python-url-normalize-1.4.3-15
==> Remove make dependencies after install? [y/N] 1 python-url-normalize (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> :: PKGBUILD up to date, Skipping (1/0): python-url-normalize
1 python-url-normalize (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> :: (1/1) Parsing SRCINFO: python-url-normalize
resolving dependencies...
looking for conflicting packages...
Package (46) New Version Net Change
community/python-build 0.7.0-4 0.95 MiB
community/python-cachecontrol 1:0.12.6-4 0.10 MiB
community/python-cachy 0.3.0-6 0.18 MiB
extra/python-cffi 1.15.0-3 1.02 MiB
extra/python-chardet 4.0.0-5 2.10 MiB
community/python-cleo 0.8.1-4 0.12 MiB
community/python-clikit 0.6.2-5 0.76 MiB
community/python-coverage 6.1.1-3 1.20 MiB
community/python-crashtest 0.3.1-5 0.04 MiB
extra/python-cryptography 36.0.1-1 4.14 MiB
community/python-distlib 0.3.4-1 0.93 MiB
community/python-entrypoints 0.3-8 0.01 MiB
community/python-filelock 3.4.0-3 0.05 MiB
community/python-html5lib 1.1-11 1.34 MiB
extra/python-idna 3.3-3 0.66 MiB
community/python-install 0.0.3-3 0.08 MiB
community/python-jeepney 0.7.1-3 0.43 MiB
community/python-jsonschema 3.2.0-6 0.57 MiB
community/python-keyring 23.4.0-1 0.22 MiB
community/python-lark-parser 0.12.0-1 0.84 MiB
community/python-lockfile 0.12.2-11 0.08 MiB
community/python-msgpack 1.0.3-1 0.25 MiB
community/python-pastel 0.2.1-3 0.03 MiB
extra/python-pep517 0.12.0-4 0.13 MiB
community/python-pexpect 4.8.0-6 0.31 MiB
community/python-pkginfo 1.7.1-3 0.25 MiB
extra/python-platformdirs 2.4.1-1 0.12 MiB
extra/python-ply 3.11-10 0.31 MiB
community/python-poetry 1.1.12-3 1.40 MiB
community/python-poetry-core 1.0.7-3 0.76 MiB
community/python-ptyprocess 0.7.0-4 0.06 MiB
extra/python-pycparser 2.21-3 1.39 MiB
community/python-pylev 1.4.0-4 0.02 MiB
community/python-pyrsistent 0.18.0-3 0.48 MiB
community/python-pytest-cov 2.12.1-6 0.11 MiB
community/python-pytest-socket 0.5.0-1 0.02 MiB
extra/python-requests 2.26.0-5 0.45 MiB
community/python-requests-toolbelt 0.9.1-7 0.38 MiB
community/python-secretstorage 3.3.1-3 0.09 MiB
community/python-shellingham 1.4.0-4 0.04 MiB
extra/python-tomli 1.2.3-1 0.06 MiB
community/python-tomlkit 0.8.0-1 0.34 MiB
community/python-typing_extensions 4.0.1-1 0.16 MiB
extra/python-urllib3 1.26.7-5 0.70 MiB
extra/python-virtualenv 20.11.0-1 6.82 MiB
community/python-webencodings 0.5.1-9 0.06 MiB
Total Installed Size: 30.55 MiB
:: Proceed with installation? [Y/n] checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing python-tomli...
installing python-pep517...
installing python-build...
Optional dependencies for python-build
python-virtualenv: Use virtualenv for build isolation [pending]
installing python-install...
installing python-msgpack...
installing python-urllib3...
Optional dependencies for python-urllib3
python-pysocks: SOCKS support
python-brotli: Brotli support
python-pyopenssl: security support
python-idna: security support [pending]
installing python-chardet...
installing python-idna...
installing python-requests...
Optional dependencies for python-requests
python-pysocks: SOCKS proxy support
installing python-cachecontrol...
Optional dependencies for python-cachecontrol
python-lockfile: for the FileCache [pending]
installing python-cachy...
installing python-crashtest...
installing python-pastel...
installing python-pylev...
installing python-typing_extensions...
installing python-clikit...
installing python-cleo...
installing python-webencodings...
installing python-html5lib...
Optional dependencies for python-html5lib
python-lxml: lxml treebuilder
python-genshi: genshi treewalker
installing python-entrypoints...
installing python-ply...
installing python-pycparser...
installing python-cffi...
installing python-cryptography...
installing python-jeepney...
installing python-secretstorage...
installing python-keyring...
Optional dependencies for python-keyring
python-keyrings-alt: Alternative backends
python-dbus: kwallet backend
installing python-lockfile...
installing python-ptyprocess...
installing python-pexpect...
installing python-pkginfo...
installing python-pyrsistent...
installing python-jsonschema...
installing python-lark-parser...
installing python-tomlkit...
installing python-poetry-core...
installing python-requests-toolbelt...
installing python-shellingham...
installing python-platformdirs...
installing python-distlib...
installing python-filelock...
installing python-virtualenv...
installing python-poetry...
installing python-coverage...
Optional dependencies for python-coverage
python-tomli: for pyproject.toml support [installed]
installing python-pytest-cov...
installing python-pytest-socket...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Making package: python-url-normalize 1.4.3-15 (Wed 05 Jan 2022 05:35:42 PM -05)
==> Retrieving sources...
-> Found 1.4.3.tar.gz
==> Validating source files with sha512sums...
1.4.3.tar.gz ... Passed
-> python-build not satisfied, flushing install queue
==> Making package: python-url-normalize 1.4.3-15 (Wed 05 Jan 2022 05:35:43 PM -05)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found 1.4.3.tar.gz
==> Validating source files with sha512sums...
1.4.3.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting 1.4.3.tar.gz with bsdtar
==> Sources are ready.
==> Making package: python-url-normalize 1.4.3-15 (Wed 05 Jan 2022 05:35:44 PM -05)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
* Building wheel...
Successfully built url_normalize-1.4.3-py2.py3-none-any.whl
==> Starting check()...
============================= test session starts ==============================
platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /tmp/makepkg/python-url-normalize/src/url-normalize-1.4.3, configfile: tox.ini
plugins: flakes-4.0.5, cov-2.12.1, socket-0.5.0
collecting ... collected 29 items
tests/__init__.py::flake-8 ERROR [ 3%]
tests/test_deconstruct_url.py::flake-8 ERROR [ 6%]
tests/test_deconstruct_url.py::test_deconstruct_url_result_is_expected PASSED [ 10%]
tests/test_generic_url_cleanup.py::flake-8 ERROR [ 13%]
tests/test_generic_url_cleanup.py::test_generic_url_cleanup_result_is_expected PASSED [ 17%]
tests/test_normalize_fragment.py::flake-8 ERROR [ 20%]
tests/test_normalize_fragment.py::test_normalize_fragment_result_is_expected PASSED [ 24%]
tests/test_normalize_host.py::flake-8 ERROR [ 27%]
tests/test_normalize_host.py::test_normalize_host_result_is_expected PASSED [ 31%]
tests/test_normalize_path.py::flake-8 ERROR [ 34%]
tests/test_normalize_path.py::test_normalize_host_result_is_expected PASSED [ 37%]
tests/test_normalize_port.py::flake-8 ERROR [ 41%]
tests/test_normalize_port.py::test_normalize_port_result_is_expected PASSED [ 44%]
tests/test_normalize_query.py::flake-8 ERROR [ 48%]
tests/test_normalize_query.py::test_normalize_query_result_is_expected PASSED [ 51%]
tests/test_normalize_scheme.py::flake-8 ERROR [ 55%]
tests/test_normalize_scheme.py::test_normalize_scheme_result_is_expected PASSED [ 58%]
tests/test_normalize_userinfo.py::flake-8 ERROR [ 62%]
tests/test_normalize_userinfo.py::test_normalize_userinfo_result_is_expected PASSED [ 65%]
tests/test_provide_url_scheme.py::flake-8 ERROR [ 68%]
tests/test_provide_url_scheme.py::test_provide_url_scheme_result_is_expected PASSED [ 72%]
tests/test_provide_url_scheme.py::test_provide_url_scheme_accept_default_scheme_param PASSED [ 75%]
tests/test_reconstruct_url.py::flake-8 ERROR [ 79%]
tests/test_reconstruct_url.py::test_deconstruct_url_result_is_expected PASSED [ 82%]
tests/test_url_normalize.py::flake-8 ERROR [ 86%]
tests/test_url_normalize.py::test_url_normalize_changes PASSED [ 89%]
tests/test_url_normalize.py::test_url_normalize_results PASSED [ 93%]
tests/test_url_normalize.py::test_url_normalize_with_http_scheme PASSED [ 96%]
tests/test_url_normalize.py::test_url_normalize_with_no_params_sorting PASSED [100%]
==================================== ERRORS ====================================
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2cf3d6c0>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2cf20e20>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2ce7e710>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2ce088e0>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2e14ad40>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2dfb45e0>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2e1b0820>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2ce54400>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2e1b00d0>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2d005a50>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2e187760>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2cd8d960>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2e1b0670>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2cdb7400>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2e1b0c10>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2d006da0>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2cf3fd00>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2ce0b2b0>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2cf3fe20>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2cca7910>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2ce7e710>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2e16ae00>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2e1b0c10>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2ce51540>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
_______________________ ERROR at setup of pyflakes-check _______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7faa2ce611b0>
when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: "Callable[[], TResult]",
when: "Literal['collect', 'setup', 'call', 'teardown']",
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:311:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/usr/lib/python3.10/site-packages/_pytest/runner.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_setup'>, args = ()
kwargs = {'item': <FlakesItem flake-8>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3.10/site-packages/pluggy/hooks.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7faa2e241450>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3.10/site-packages/pluggy/manager.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
kwargs = {'item': <FlakesItem flake-8>}
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/usr/lib/python3.10/site-packages/pluggy/manager.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
res = hook_impl.function(*args)
if res is not None:
results.append(res)
if firstresult: # halt further impl calls
break
except BaseException:
excinfo = sys.exc_info()
finally:
if firstresult: # first result hooks return a single value
outcome = _Result(results[0] if results else None, excinfo)
else:
outcome = _Result(results, excinfo)
# run all wrapper post-yield blocks
for gen in reversed(teardowns):
try:
gen.send(outcome)
_raise_wrapfail(gen, "has second yield")
except StopIteration:
pass
> return outcome.get_result()
/usr/lib/python3.10/site-packages/pluggy/callers.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pluggy.callers._Result object at 0x7faa2cdbac50>
def get_result(self):
"""Get the result(s) for this hook call.
If the hook was marked as a ``firstresult`` only a single value
will be returned otherwise a list of results.
"""
__tracebackhide__ = True
if self._excinfo is None:
return self._result
else:
ex = self._excinfo
if _py3:
> raise ex[1].with_traceback(ex[2])
/usr/lib/python3.10/site-packages/pluggy/callers.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook_impls = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.10/site-packages/_pytest/nose.py'>...', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>, ...]
caller_kwargs = {'item': <FlakesItem flake-8>}, firstresult = False
def _multicall(hook_impls, caller_kwargs, firstresult=False):
"""Execute a call into multiple python functions/methods and return the
result(s).
``caller_kwargs`` comes from _HookCaller.__call__().
"""
__tracebackhide__ = True
results = []
excinfo = None
try: # run impl and wrapper setup functions in a loop
teardowns = []
try:
for hook_impl in reversed(hook_impls):
try:
args = [caller_kwargs[argname] for argname in hook_impl.argnames]
except KeyError:
for argname in hook_impl.argnames:
if argname not in caller_kwargs:
raise HookCallError(
"hook call must provide argument %r" % (argname,)
)
if hook_impl.hookwrapper:
try:
gen = hook_impl.function(*args)
next(gen) # first yield
teardowns.append(gen)
except StopIteration:
_raise_wrapfail(gen, "did not yield")
else:
> res = hook_impl.function(*args)
/usr/lib/python3.10/site-packages/pluggy/callers.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <FlakesItem flake-8>
def pytest_runtest_setup(item) -> None:
"""During each test item's setup phase,
choose the behavior based on the configurations supplied.
This is the bulk of the logic for the plugin.
As the logic can be extensive, this method is allowed complexity.
It may be refactored in the future to be more readable.
"""
# If test has the `enable_socket` marker, we accept this as most explicit.
> if "socket_enabled" in item.fixturenames or item.get_closest_marker(
"enable_socket"
):
E AttributeError: 'FlakesItem' object has no attribute 'fixturenames'
/usr/lib/python3.10/site-packages/pytest_socket.py:118: AttributeError
---------- coverage: platform linux, python 3.10.1-final-0 -----------
Name Stmts Miss Cover Missing
------------------------------------------------------
url_normalize/tools.py 29 1 97% 68
------------------------------------------------------
TOTAL 112 1 99%
2 files skipped due to complete coverage.
Required test coverage of 99% reached. Total coverage: 99.11%
=========================== short test summary info ============================
ERROR tests/__init__.py::flake-8 - AttributeError: 'FlakesItem' object has no...
ERROR tests/test_deconstruct_url.py::flake-8 - AttributeError: 'FlakesItem' o...
ERROR tests/test_generic_url_cleanup.py::flake-8 - AttributeError: 'FlakesIte...
ERROR tests/test_normalize_fragment.py::flake-8 - AttributeError: 'FlakesItem...
ERROR tests/test_normalize_host.py::flake-8 - AttributeError: 'FlakesItem' ob...
ERROR tests/test_normalize_path.py::flake-8 - AttributeError: 'FlakesItem' ob...
ERROR tests/test_normalize_port.py::flake-8 - AttributeError: 'FlakesItem' ob...
ERROR tests/test_normalize_query.py::flake-8 - AttributeError: 'FlakesItem' o...
ERROR tests/test_normalize_scheme.py::flake-8 - AttributeError: 'FlakesItem' ...
ERROR tests/test_normalize_userinfo.py::flake-8 - AttributeError: 'FlakesItem...
ERROR tests/test_provide_url_scheme.py::flake-8 - AttributeError: 'FlakesItem...
ERROR tests/test_reconstruct_url.py::flake-8 - AttributeError: 'FlakesItem' o...
ERROR tests/test_url_normalize.py::flake-8 - AttributeError: 'FlakesItem' obj...
======================== 16 passed, 13 errors in 1.08s =========================
==> ERROR: A failure occurred in check().
Aborting...
checking dependencies...
Package (46) Old Version Net Change
python-build 0.7.0-4 -0.95 MiB
python-cachecontrol 1:0.12.6-4 -0.10 MiB
python-cachy 0.3.0-6 -0.18 MiB
python-cffi 1.15.0-3 -1.02 MiB
python-chardet 4.0.0-5 -2.10 MiB
python-cleo 0.8.1-4 -0.12 MiB
python-clikit 0.6.2-5 -0.76 MiB
python-coverage 6.1.1-3 -1.20 MiB
python-crashtest 0.3.1-5 -0.04 MiB
python-cryptography 36.0.1-1 -4.14 MiB
python-distlib 0.3.4-1 -0.93 MiB
python-entrypoints 0.3-8 -0.01 MiB
python-filelock 3.4.0-3 -0.05 MiB
python-html5lib 1.1-11 -1.34 MiB
python-idna 3.3-3 -0.66 MiB
python-install 0.0.3-3 -0.08 MiB
python-jeepney 0.7.1-3 -0.43 MiB
python-jsonschema 3.2.0-6 -0.57 MiB
python-keyring 23.4.0-1 -0.22 MiB
python-lark-parser 0.12.0-1 -0.84 MiB
python-lockfile 0.12.2-11 -0.08 MiB
python-msgpack 1.0.3-1 -0.25 MiB
python-pastel 0.2.1-3 -0.03 MiB
python-pep517 0.12.0-4 -0.13 MiB
python-pexpect 4.8.0-6 -0.31 MiB
python-pkginfo 1.7.1-3 -0.25 MiB
python-platformdirs 2.4.1-1 -0.12 MiB
python-ply 3.11-10 -0.31 MiB
python-poetry 1.1.12-3 -1.40 MiB
python-poetry-core 1.0.7-3 -0.76 MiB
python-ptyprocess 0.7.0-4 -0.06 MiB
python-pycparser 2.21-3 -1.39 MiB
python-pylev 1.4.0-4 -0.02 MiB
python-pyrsistent 0.18.0-3 -0.48 MiB
python-pytest-cov 2.12.1-6 -0.11 MiB
python-pytest-socket 0.5.0-1 -0.02 MiB
python-requests 2.26.0-5 -0.45 MiB
python-requests-toolbelt 0.9.1-7 -0.38 MiB
python-secretstorage 3.3.1-3 -0.09 MiB
python-shellingham 1.4.0-4 -0.04 MiB
python-tomli 1.2.3-1 -0.06 MiB
python-tomlkit 0.8.0-1 -0.34 MiB
python-typing_extensions 4.0.1-1 -0.16 MiB
python-urllib3 1.26.7-5 -0.70 MiB
python-virtualenv 20.11.0-1 -6.82 MiB
python-webencodings 0.5.1-9 -0.06 MiB
Total Removed Size: 30.55 MiB
:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
removing python-pytest-socket...
removing python-pytest-cov...
removing python-coverage...
removing python-poetry...
removing python-virtualenv...
removing python-filelock...
removing python-distlib...
removing python-platformdirs...
removing python-shellingham...
removing python-requests-toolbelt...
removing python-poetry-core...
removing python-tomlkit...
removing python-lark-parser...
removing python-jsonschema...
removing python-pyrsistent...
removing python-pkginfo...
removing python-pexpect...
removing python-ptyprocess...
removing python-lockfile...
removing python-keyring...
removing python-secretstorage...
removing python-jeepney...
removing python-cryptography...
removing python-cffi...
removing python-pycparser...
removing python-ply...
removing python-entrypoints...
removing python-html5lib...
removing python-webencodings...
removing python-cleo...
removing python-clikit...
removing python-typing_extensions...
removing python-pylev...
removing python-pastel...
removing python-crashtest...
removing python-cachy...
removing python-cachecontrol...
removing python-requests...
removing python-idna...
removing python-chardet...
removing python-urllib3...
removing python-msgpack...
removing python-install...
removing python-build...
removing python-pep517...
removing python-tomli...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
-> error making: python-url-normalize