==> Building on litleo ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list ./ PKGBUILD 700 57% 0.00kB/s 0:00:00 1,214 100% 501.95kB/s 0:00:00 (xfr#1, to-chk=1/3) python-pytest-flake8-1.1.1-2.log 205 100% 200.20kB/s 0:00:00 205 100% 200.20kB/s 0:00:00 (xfr#2, to-chk=0/3) sent 344 bytes received 69 bytes 275.33 bytes/sec total size is 1,377 speedup is 3.33 ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l root9 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... there is nothing to do [?25h==> Building in chroot for [extra] (riscv64)... ==> Locking clean chroot [/var/lib/archbuild/extra-riscv64/root]...done ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [root9]...done ==> Making package: python-pytest-flake8 1.1.1-2 (Fri Jun 30 13:55:37 2023) ==> Retrieving sources...  -> Found python-pytest-flake8-1.1.1.tar.gz ==> Validating source files with sha512sums... python-pytest-flake8-1.1.1.tar.gz ... Passed ==> Making package: python-pytest-flake8 1.1.1-2 (Fri Jun 30 13:55:55 2023) ==> Checking runtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (11) New Version Net Change Download Size core/libnsl 2.0.0-3 0.06 MiB core/python 3.11.3-1 104.68 MiB extra/python-entrypoints 0.4-3 0.04 MiB 0.01 MiB extra/python-iniconfig 2.0.0-4 0.04 MiB extra/python-mccabe 0.7.0-5 0.06 MiB 0.02 MiB extra/python-packaging 23.1-1 0.47 MiB extra/python-pluggy 1.0.0-4 0.13 MiB extra/python-pycodestyle 2.10.0-2 0.36 MiB extra/python-pyflakes 3.0.1-3 1.14 MiB 0.14 MiB extra/flake8 1:6.0.0-3 0.58 MiB 0.11 MiB extra/python-pytest 7.3.2-1 3.98 MiB Total Download Size: 0.28 MiB Total Installed Size: 111.53 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-pyflakes-3.0.1-3-any downloading... flake8-1:6.0.0-3-any downloading... python-mccabe-0.7.0-5-any downloading... python-entrypoints-0.4-3-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing libnsl... installing python... Optional dependencies for python python-setuptools python-pip sqlite [installed] mpdecimal: for decimal xz: for lzma [installed] tk: for tkinter installing python-iniconfig... installing python-packaging... installing python-pluggy... installing python-pytest... installing python-pyflakes... installing python-mccabe... installing python-pycodestyle... installing python-entrypoints... installing flake8... [?25h==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (15) New Version Net Change extra/python-autocommand 2.2.2-4 0.08 MiB extra/python-fastjsonschema 2.17.1-1 0.29 MiB extra/python-inflect 6.0.4-2 0.38 MiB extra/python-jaraco.context 4.3.0-3 0.04 MiB extra/python-jaraco.functools 3.7.0-1 0.07 MiB extra/python-jaraco.text 3.11.1-3 0.09 MiB extra/python-more-itertools 9.1.1-4 0.61 MiB extra/python-ordered-set 4.1.0-4 0.07 MiB extra/python-platformdirs 3.5.1-1 0.20 MiB extra/python-pydantic 1.10.9-1 6.57 MiB extra/python-tomli 2.0.1-3 0.11 MiB extra/python-trove-classifiers 2023.5.24-1 0.11 MiB extra/python-typing_extensions 4.7.0-1 0.37 MiB extra/python-validate-pyproject 0.13-1 0.29 MiB extra/python-setuptools 1:67.7.0-1 4.68 MiB Total Installed Size: 13.96 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-more-itertools... installing python-jaraco.functools... installing python-jaraco.context... installing python-autocommand... installing python-typing_extensions... installing python-pydantic... Optional dependencies for python-pydantic python-dotenv: for .env file support python-email-validator: for email validation installing python-inflect... installing python-jaraco.text... installing python-ordered-set... installing python-platformdirs... installing python-tomli... installing python-fastjsonschema... installing python-trove-classifiers... installing python-validate-pyproject... installing python-setuptools... [?25h==> Retrieving sources...  -> Found python-pytest-flake8-1.1.1.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting python-pytest-flake8-1.1.1.tar.gz with bsdtar ==> Starting prepare()... ==> Starting build()... running build running build_py creating build creating build/lib copying pytest_flake8.py -> build/lib ==> Starting check()... running install /usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer, pypa/build or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running build running build_py running install_lib creating /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install creating /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr creating /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib creating /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11 creating /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages copying build/lib/pytest_flake8.py -> /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages byte-compiling /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py to pytest_flake8.cpython-311.pyc writing byte-compilation script '/tmp/tmp_14fe4hc.py' /usr/bin/python /tmp/tmp_14fe4hc.py removing /tmp/tmp_14fe4hc.py running install_egg_info running egg_info creating pytest_flake8.egg-info writing pytest_flake8.egg-info/PKG-INFO writing dependency_links to pytest_flake8.egg-info/dependency_links.txt writing entry points to pytest_flake8.egg-info/entry_points.txt writing requirements to pytest_flake8.egg-info/requires.txt writing top-level names to pytest_flake8.egg-info/top_level.txt writing manifest file 'pytest_flake8.egg-info/SOURCES.txt' reading manifest file 'pytest_flake8.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no directories found matching 'doc' warning: no directories found matching 'test_flake8.py' adding license file 'LICENSE' writing manifest file 'pytest_flake8.egg-info/SOURCES.txt' Copying pytest_flake8.egg-info to /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8-1.1.1-py3.11.egg-info running install_scripts ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /build/python-pytest-flake8/src/pytest-flake8-1.1.1 configfile: tox.ini plugins: flake8-1.1.1 collected 17 items pytest_flake8.py F [ 5%] setup.py F [ 11%] test_flake8.py F..FFFF.FFFFxF [ 94%] tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py F [100%] =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40042e1440> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x40040373d0> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/build/python-pytest-flake8/src/pytest-flake8-1.1.1/pytest_flake8.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40042e1620> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x40040373d0> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/build/python-pytest-flake8/src/pytest-flake8-1.1.1/setup.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40042e1580> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x40040373d0> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError ___________________ TestIgnores.test_default_flake8_ignores ____________________ self = testdir = def test_default_flake8_ignores(self, testdir): testdir.makeini(""" [pytest] markers = flake8 [flake8] ignore = E203 *.py E300 tests/*.py ALL E203 # something """) testdir.tmpdir.ensure("xy.py") testdir.tmpdir.ensure("tests/hello.py") result = testdir.runpytest("--flake8", "-s") > result.assert_outcomes(passed=2) E AssertionError: assert {'errors': 0,...pped': 0, ...} == {'errors': 0,...pped': 0, ...} E Omitting 4 identical items, use -vv to show E Differing items: E {'failed': 2} != {'failed': 0} E {'passed': 0} != {'passed': 2} E Use -v to get more diff /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:53: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /tmp/pytest-of-builduser/pytest-0/test_default_flake8_ignores0 configfile: tox.ini plugins: flake8-1.1.1 collected 2 items xy.py F tests/hello.py F =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40042e3a60> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4004429190> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x40042e3b00> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_default_flake8_ignores0/xy.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40042e3e20> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4004429190> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x40042e3d80> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_default_flake8_ignores0/tests/hello.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED xy.py::flake-8::FLAKE8 - AttributeError: 'Application' object has no a... FAILED tests/hello.py::flake-8::FLAKE8 - AttributeError: 'Application' object... ============================== 2 failed in 0.78s =============================== _________________________ TestIgnores.test_ignores_all _________________________ self = testdir = def test_ignores_all(self, testdir): """Verify success when all errors are ignored.""" testdir.makeini(""" [pytest] markers = flake8 flake8-ignore = E203 *.py E300 tests/*.py ALL E203 # something """) testdir.tmpdir.ensure("xy.py") testdir.tmpdir.ensure("tests/hello.py") result = testdir.runpytest("--flake8", "-s") > result.assert_outcomes(passed=1) E AssertionError: assert {'errors': 0,...pped': 0, ...} == {'errors': 0,...pped': 0, ...} E Omitting 4 identical items, use -vv to show E Differing items: E {'failed': 1} != {'failed': 0} E {'passed': 0} != {'passed': 1} E Use -v to get more diff /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:72: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /tmp/pytest-of-builduser/pytest-0/test_ignores_all0 configfile: tox.ini plugins: flake8-1.1.1 collected 1 item xy.py F =================================== FAILURES =================================== _______________________ FLAKE8-check(ignoring E203 E300) _______________________ cls = func = . at 0x4004351760> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x40045369d0> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x4004351800> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_ignores_all0/xy.py') flake8ignore = ['E203', 'E300'], maxlength = '', maxdoclenght = '' maxcomplexity = '', showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED xy.py::flake-8::FLAKE8 - AttributeError: 'Application' object has no a... ============================== 1 failed in 0.38s =============================== __________________________ TestIgnores.test_w293w292 ___________________________ self = testdir = example = local('/tmp/pytest-of-builduser/pytest-0/test_w293w2920/test_w293w292.py') def test_w293w292(self, testdir, example): result = testdir.runpytest("--flake8", ) > result.stdout.fnmatch_lines([ # "*plugins*flake8*", "*W293*", "*W292*", ]) E Failed: nomatch: '*W293*' E and: '============================= test session starts ==============================' E and: 'platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0' E and: 'rootdir: /tmp/pytest-of-builduser/pytest-0/test_w293w2920' E and: 'plugins: flake8-1.1.1' E and: 'collected 1 item' E and: '' E and: 'test_w293w292.py F [100%]' E and: '' E and: '=================================== FAILURES ===================================' E and: '_________________________________ FLAKE8-check _________________________________' E and: '' E and: "cls = " E and: 'func = . at 0x4004352e80>' E and: "when = 'call'" E and: "reraise = (, )" E and: '' E and: ' @classmethod' E and: ' def from_call(' E and: ' cls,' E and: ' func: "Callable[[], TResult]",' E and: ' when: "Literal[\'collect\', \'setup\', \'call\', \'teardown\']",' E and: ' reraise: Optional[' E and: ' Union[Type[BaseException], Tuple[Type[BaseException], ...]]' E and: ' ] = None,' E and: ' ) -> "CallInfo[TResult]":' E and: ' """Call func, wrapping the result in a CallInfo.' E and: ' ' E and: ' :param func:' E and: ' The function to call. Called without arguments.' E and: ' :param when:' E and: ' The phase in which the function is called.' E and: ' :param reraise:' E and: ' Exception or exceptions that shall propagate if raised by the' E and: ' function, instead of being wrapped in the CallInfo.' E and: ' """' E and: ' excinfo = None' E and: ' start = timing.time()' E and: ' precise_start = timing.perf_counter()' E and: ' try:' E and: '> result: Optional[TResult] = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:341: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: ihook(item=item, **kwds), when=when, reraise=reraise' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:262: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "self = <_HookCaller 'pytest_runtest_call'>, args = ()" E and: "kwargs = {'item': }, argname = 'item', firstresult = False" E and: '' E and: ' def __call__(self, *args, **kwargs):' E and: ' if args:' E and: ' raise TypeError("hook calling supports only keyword arguments")' E and: ' assert not self.is_historic()' E and: ' ' E and: ' # This is written to avoid expensive operations when not needed.' E and: ' if self.spec:' E and: ' for argname in self.spec.argnames:' E and: ' if argname not in kwargs:' E and: ' notincall = tuple(set(self.spec.argnames) - kwargs.keys())' E and: ' warnings.warn(' E and: ' "Argument(s) {} which are declared in the hookspec "' E and: ' "can not be found in this hook call".format(notincall),' E and: ' stacklevel=2,' E and: ' )' E and: ' break' E and: ' ' E and: ' firstresult = self.spec.opts.get("firstresult")' E and: ' else:' E and: ' firstresult = False' E and: ' ' E and: '> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = <_pytest.config.PytestPluginManager object at 0x40044cd110>' E and: "hook_name = 'pytest_runtest_call'" E and: "methods = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _hookexec(self, hook_name, methods, kwargs, firstresult):' E and: ' # called from all hookcaller instances.' E and: ' # enable_tracing will set its own wrapping function at self._inner_hookexec' E and: '> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:80: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def traced_hookexec(hook_name, hook_impls, kwargs, firstresult):' E and: ' before(hook_name, hook_impls, kwargs)' E and: ' outcome = _Result.from_call(' E and: ' lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: ' after(outcome, hook_name, hook_impls, kwargs)' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:327: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "cls = " E and: 'func = .traced_hookexec.. at 0x4004353060>' E and: '' E and: ' @classmethod' E and: ' def from_call(cls, func):' E and: ' __tracebackhide__ = True' E and: ' result = excinfo = None' E and: ' try:' E and: '> result = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:33: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:324: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: ' res = hook_impl.function(*args)' E and: ' if res is not None:' E and: ' results.append(res)' E and: ' if firstresult: # halt further impl calls' E and: ' break' E and: ' except BaseException:' E and: ' excinfo = sys.exc_info()' E and: ' finally:' E and: ' if firstresult: # first result hooks return a single value' E and: ' outcome = _Result(results[0] if results else None, excinfo)' E and: ' else:' E and: ' outcome = _Result(results, excinfo)' E and: ' ' E and: ' # run all wrapper post-yield blocks' E and: ' for gen in reversed(teardowns):' E and: ' try:' E and: ' gen.send(outcome)' E and: ' _raise_wrapfail(gen, "has second yield")' E and: ' except StopIteration:' E and: ' pass' E and: ' ' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: '> res = hook_impl.function(*args)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:39: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: ' item.runtest()' E and: ' except Exception as e:' E and: ' # Store trace info to allow postmortem debugging' E and: ' sys.last_type = type(e)' E and: ' sys.last_value = e' E and: ' assert e.__traceback__ is not None' E and: ' # Skip *this* frame' E and: ' sys.last_traceback = e.__traceback__.tb_next' E and: '> raise e' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:177: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: '> item.runtest()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:169: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def runtest(self):' E and: " with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \\" E and: " BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \\" E and: ' redirect_stdout(to), redirect_stderr(te):' E and: '> found_errors = check_file(' E and: ' self.fspath,' E and: ' self.flake8ignore,' E and: ' self.maxlength,' E and: ' self.maxdoclength,' E and: ' self.maxcomplexity,' E and: ' self.showsource,' E and: ' self.statistics' E and: ' )' E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "path = local('/tmp/pytest-of-builduser/pytest-0/test_w293w2920/test_w293w292.py')" E and: "flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = ''" E and: 'showsource = [], statistics = []' E and: '' E and: ' def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity,' E and: ' showsource, statistics):' E and: ' """Run flake8 over a single file, and return the number of failures."""' E and: ' args = []' E and: ' if maxlength:' E and: " args += ['--max-line-length', maxlength]" E and: ' if maxdoclenght:' E and: " args += ['--max-doc-length', maxdoclenght]" E and: ' if maxcomplexity:' E and: " args += ['--max-complexity', maxcomplexity]" E and: ' if showsource:' E and: " args += ['--show-source']" E and: ' if statistics:' E and: " args += ['--statistics']" E and: ' app = application.Application()' E and: '> prelim_opts, remaining_args = app.parse_preliminary_options(args)' E and: "E AttributeError: 'Application' object has no attribute 'parse_preliminary_options'" E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError' E and: '=========================== short test summary info ============================' E and: "FAILED test_w293w292.py::flake-8::FLAKE8 - AttributeError: 'Application' obje..." E and: '============================== 1 failed in 0.39s ===============================' E remains unmatched: '*W293*' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:81: Failed ---------------------------- Captured stderr setup ----------------------------- /tmp/pytest-of-builduser/pytest-0/test_w293w2920 ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /tmp/pytest-of-builduser/pytest-0/test_w293w2920 plugins: flake8-1.1.1 collected 1 item test_w293w292.py F [100%] =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x4004352e80> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x40044cd110> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x4004353060> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_w293w2920/test_w293w292.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED test_w293w292.py::flake-8::FLAKE8 - AttributeError: 'Application' obje... ============================== 1 failed in 0.39s =============================== ________________________ TestIgnores.test_mtime_caching ________________________ self = testdir = example = local('/tmp/pytest-of-builduser/pytest-0/test_mtime_caching0/test_mtime_caching.py') def test_mtime_caching(self, testdir, example): testdir.tmpdir.ensure("hello.py") result = testdir.runpytest("--flake8", ) > result.stdout.fnmatch_lines([ # "*plugins*flake8*", "*W293*", "*W292*", ]) E Failed: nomatch: '*W293*' E and: '============================= test session starts ==============================' E and: 'platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0' E and: 'rootdir: /tmp/pytest-of-builduser/pytest-0/test_mtime_caching0' E and: 'plugins: flake8-1.1.1' E and: 'collected 2 items' E and: '' E and: 'hello.py F [ 50%]' E and: 'test_mtime_caching.py F [100%]' E and: '' E and: '=================================== FAILURES ===================================' E and: '_________________________________ FLAKE8-check _________________________________' E and: '' E and: "cls = " E and: 'func = . at 0x4004465b20>' E and: "when = 'call'" E and: "reraise = (, )" E and: '' E and: ' @classmethod' E and: ' def from_call(' E and: ' cls,' E and: ' func: "Callable[[], TResult]",' E and: ' when: "Literal[\'collect\', \'setup\', \'call\', \'teardown\']",' E and: ' reraise: Optional[' E and: ' Union[Type[BaseException], Tuple[Type[BaseException], ...]]' E and: ' ] = None,' E and: ' ) -> "CallInfo[TResult]":' E and: ' """Call func, wrapping the result in a CallInfo.' E and: ' ' E and: ' :param func:' E and: ' The function to call. Called without arguments.' E and: ' :param when:' E and: ' The phase in which the function is called.' E and: ' :param reraise:' E and: ' Exception or exceptions that shall propagate if raised by the' E and: ' function, instead of being wrapped in the CallInfo.' E and: ' """' E and: ' excinfo = None' E and: ' start = timing.time()' E and: ' precise_start = timing.perf_counter()' E and: ' try:' E and: '> result: Optional[TResult] = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:341: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: ihook(item=item, **kwds), when=when, reraise=reraise' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:262: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "self = <_HookCaller 'pytest_runtest_call'>, args = ()" E and: "kwargs = {'item': }, argname = 'item', firstresult = False" E and: '' E and: ' def __call__(self, *args, **kwargs):' E and: ' if args:' E and: ' raise TypeError("hook calling supports only keyword arguments")' E and: ' assert not self.is_historic()' E and: ' ' E and: ' # This is written to avoid expensive operations when not needed.' E and: ' if self.spec:' E and: ' for argname in self.spec.argnames:' E and: ' if argname not in kwargs:' E and: ' notincall = tuple(set(self.spec.argnames) - kwargs.keys())' E and: ' warnings.warn(' E and: ' "Argument(s) {} which are declared in the hookspec "' E and: ' "can not be found in this hook call".format(notincall),' E and: ' stacklevel=2,' E and: ' )' E and: ' break' E and: ' ' E and: ' firstresult = self.spec.opts.get("firstresult")' E and: ' else:' E and: ' firstresult = False' E and: ' ' E and: '> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = <_pytest.config.PytestPluginManager object at 0x400461ad50>' E and: "hook_name = 'pytest_runtest_call'" E and: "methods = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _hookexec(self, hook_name, methods, kwargs, firstresult):' E and: ' # called from all hookcaller instances.' E and: ' # enable_tracing will set its own wrapping function at self._inner_hookexec' E and: '> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:80: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def traced_hookexec(hook_name, hook_impls, kwargs, firstresult):' E and: ' before(hook_name, hook_impls, kwargs)' E and: ' outcome = _Result.from_call(' E and: ' lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: ' after(outcome, hook_name, hook_impls, kwargs)' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:327: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "cls = " E and: 'func = .traced_hookexec.. at 0x4004465a80>' E and: '' E and: ' @classmethod' E and: ' def from_call(cls, func):' E and: ' __tracebackhide__ = True' E and: ' result = excinfo = None' E and: ' try:' E and: '> result = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:33: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:324: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: ' res = hook_impl.function(*args)' E and: ' if res is not None:' E and: ' results.append(res)' E and: ' if firstresult: # halt further impl calls' E and: ' break' E and: ' except BaseException:' E and: ' excinfo = sys.exc_info()' E and: ' finally:' E and: ' if firstresult: # first result hooks return a single value' E and: ' outcome = _Result(results[0] if results else None, excinfo)' E and: ' else:' E and: ' outcome = _Result(results, excinfo)' E and: ' ' E and: ' # run all wrapper post-yield blocks' E and: ' for gen in reversed(teardowns):' E and: ' try:' E and: ' gen.send(outcome)' E and: ' _raise_wrapfail(gen, "has second yield")' E and: ' except StopIteration:' E and: ' pass' E and: ' ' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: '> res = hook_impl.function(*args)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:39: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: ' item.runtest()' E and: ' except Exception as e:' E and: ' # Store trace info to allow postmortem debugging' E and: ' sys.last_type = type(e)' E and: ' sys.last_value = e' E and: ' assert e.__traceback__ is not None' E and: ' # Skip *this* frame' E and: ' sys.last_traceback = e.__traceback__.tb_next' E and: '> raise e' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:177: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: '> item.runtest()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:169: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def runtest(self):' E and: " with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \\" E and: " BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \\" E and: ' redirect_stdout(to), redirect_stderr(te):' E and: '> found_errors = check_file(' E and: ' self.fspath,' E and: ' self.flake8ignore,' E and: ' self.maxlength,' E and: ' self.maxdoclength,' E and: ' self.maxcomplexity,' E and: ' self.showsource,' E and: ' self.statistics' E and: ' )' E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "path = local('/tmp/pytest-of-builduser/pytest-0/test_mtime_caching0/hello.py')" E and: "flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = ''" E and: 'showsource = [], statistics = []' E and: '' E and: ' def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity,' E and: ' showsource, statistics):' E and: ' """Run flake8 over a single file, and return the number of failures."""' E and: ' args = []' E and: ' if maxlength:' E and: " args += ['--max-line-length', maxlength]" E and: ' if maxdoclenght:' E and: " args += ['--max-doc-length', maxdoclenght]" E and: ' if maxcomplexity:' E and: " args += ['--max-complexity', maxcomplexity]" E and: ' if showsource:' E and: " args += ['--show-source']" E and: ' if statistics:' E and: " args += ['--statistics']" E and: ' app = application.Application()' E and: '> prelim_opts, remaining_args = app.parse_preliminary_options(args)' E and: "E AttributeError: 'Application' object has no attribute 'parse_preliminary_options'" E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError' E and: '_________________________________ FLAKE8-check _________________________________' E and: '' E and: "cls = " E and: 'func = . at 0x4004464b80>' E and: "when = 'call'" E and: "reraise = (, )" E and: '' E and: ' @classmethod' E and: ' def from_call(' E and: ' cls,' E and: ' func: "Callable[[], TResult]",' E and: ' when: "Literal[\'collect\', \'setup\', \'call\', \'teardown\']",' E and: ' reraise: Optional[' E and: ' Union[Type[BaseException], Tuple[Type[BaseException], ...]]' E and: ' ] = None,' E and: ' ) -> "CallInfo[TResult]":' E and: ' """Call func, wrapping the result in a CallInfo.' E and: ' ' E and: ' :param func:' E and: ' The function to call. Called without arguments.' E and: ' :param when:' E and: ' The phase in which the function is called.' E and: ' :param reraise:' E and: ' Exception or exceptions that shall propagate if raised by the' E and: ' function, instead of being wrapped in the CallInfo.' E and: ' """' E and: ' excinfo = None' E and: ' start = timing.time()' E and: ' precise_start = timing.perf_counter()' E and: ' try:' E and: '> result: Optional[TResult] = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:341: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: ihook(item=item, **kwds), when=when, reraise=reraise' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:262: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "self = <_HookCaller 'pytest_runtest_call'>, args = ()" E and: "kwargs = {'item': }, argname = 'item', firstresult = False" E and: '' E and: ' def __call__(self, *args, **kwargs):' E and: ' if args:' E and: ' raise TypeError("hook calling supports only keyword arguments")' E and: ' assert not self.is_historic()' E and: ' ' E and: ' # This is written to avoid expensive operations when not needed.' E and: ' if self.spec:' E and: ' for argname in self.spec.argnames:' E and: ' if argname not in kwargs:' E and: ' notincall = tuple(set(self.spec.argnames) - kwargs.keys())' E and: ' warnings.warn(' E and: ' "Argument(s) {} which are declared in the hookspec "' E and: ' "can not be found in this hook call".format(notincall),' E and: ' stacklevel=2,' E and: ' )' E and: ' break' E and: ' ' E and: ' firstresult = self.spec.opts.get("firstresult")' E and: ' else:' E and: ' firstresult = False' E and: ' ' E and: '> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = <_pytest.config.PytestPluginManager object at 0x400461ad50>' E and: "hook_name = 'pytest_runtest_call'" E and: "methods = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _hookexec(self, hook_name, methods, kwargs, firstresult):' E and: ' # called from all hookcaller instances.' E and: ' # enable_tracing will set its own wrapping function at self._inner_hookexec' E and: '> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:80: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def traced_hookexec(hook_name, hook_impls, kwargs, firstresult):' E and: ' before(hook_name, hook_impls, kwargs)' E and: ' outcome = _Result.from_call(' E and: ' lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: ' after(outcome, hook_name, hook_impls, kwargs)' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:327: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "cls = " E and: 'func = .traced_hookexec.. at 0x4004465ee0>' E and: '' E and: ' @classmethod' E and: ' def from_call(cls, func):' E and: ' __tracebackhide__ = True' E and: ' result = excinfo = None' E and: ' try:' E and: '> result = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:33: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:324: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: ' res = hook_impl.function(*args)' E and: ' if res is not None:' E and: ' results.append(res)' E and: ' if firstresult: # halt further impl calls' E and: ' break' E and: ' except BaseException:' E and: ' excinfo = sys.exc_info()' E and: ' finally:' E and: ' if firstresult: # first result hooks return a single value' E and: ' outcome = _Result(results[0] if results else None, excinfo)' E and: ' else:' E and: ' outcome = _Result(results, excinfo)' E and: ' ' E and: ' # run all wrapper post-yield blocks' E and: ' for gen in reversed(teardowns):' E and: ' try:' E and: ' gen.send(outcome)' E and: ' _raise_wrapfail(gen, "has second yield")' E and: ' except StopIteration:' E and: ' pass' E and: ' ' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: '> res = hook_impl.function(*args)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:39: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: ' item.runtest()' E and: ' except Exception as e:' E and: ' # Store trace info to allow postmortem debugging' E and: ' sys.last_type = type(e)' E and: ' sys.last_value = e' E and: ' assert e.__traceback__ is not None' E and: ' # Skip *this* frame' E and: ' sys.last_traceback = e.__traceback__.tb_next' E and: '> raise e' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:177: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: '> item.runtest()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:169: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def runtest(self):' E and: " with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \\" E and: " BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \\" E and: ' redirect_stdout(to), redirect_stderr(te):' E and: '> found_errors = check_file(' E and: ' self.fspath,' E and: ' self.flake8ignore,' E and: ' self.maxlength,' E and: ' self.maxdoclength,' E and: ' self.maxcomplexity,' E and: ' self.showsource,' E and: ' self.statistics' E and: ' )' E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "path = local('/tmp/pytest-of-builduser/pytest-0/test_mtime_caching0/test_mtime_caching.py')" E and: "flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = ''" E and: 'showsource = [], statistics = []' E and: '' E and: ' def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity,' E and: ' showsource, statistics):' E and: ' """Run flake8 over a single file, and return the number of failures."""' E and: ' args = []' E and: ' if maxlength:' E and: " args += ['--max-line-length', maxlength]" E and: ' if maxdoclenght:' E and: " args += ['--max-doc-length', maxdoclenght]" E and: ' if maxcomplexity:' E and: " args += ['--max-complexity', maxcomplexity]" E and: ' if showsource:' E and: " args += ['--show-source']" E and: ' if statistics:' E and: " args += ['--statistics']" E and: ' app = application.Application()' E and: '> prelim_opts, remaining_args = app.parse_preliminary_options(args)' E and: "E AttributeError: 'Application' object has no attribute 'parse_preliminary_options'" E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError' E and: '=========================== short test summary info ============================' E and: "FAILED hello.py::flake-8::FLAKE8 - AttributeError: 'Application' object has n..." E and: "FAILED test_mtime_caching.py::flake-8::FLAKE8 - AttributeError: 'Application'..." E and: '============================== 2 failed in 0.77s ===============================' E remains unmatched: '*W293*' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:91: Failed ---------------------------- Captured stderr setup ----------------------------- /tmp/pytest-of-builduser/pytest-0/test_mtime_caching0 ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /tmp/pytest-of-builduser/pytest-0/test_mtime_caching0 plugins: flake8-1.1.1 collected 2 items hello.py F [ 50%] test_mtime_caching.py F [100%] =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x4004465b20> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x400461ad50> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x4004465a80> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_mtime_caching0/hello.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x4004464b80> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x400461ad50> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x4004465ee0> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_mtime_caching0/test_mtime_caching.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED hello.py::flake-8::FLAKE8 - AttributeError: 'Application' object has n... FAILED test_mtime_caching.py::flake-8::FLAKE8 - AttributeError: 'Application'... ============================== 2 failed in 0.77s =============================== _______________________________ test_ok_verbose ________________________________ testdir = def test_ok_verbose(testdir): p = testdir.makepyfile(""" class AClass: pass """) p = p.write(p.read() + "\n") result = testdir.runpytest("--flake8", "--verbose") result.stdout.fnmatch_lines([ "*test_ok_verbose*", ]) > result.assert_outcomes(passed=1) E AssertionError: assert {'errors': 0,...pped': 0, ...} == {'errors': 0,...pped': 0, ...} E Omitting 4 identical items, use -vv to show E Differing items: E {'failed': 1} != {'failed': 0} E {'passed': 0} != {'passed': 1} E Use -v to get more diff /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:139: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 -- /usr/bin/python cachedir: .pytest_cache rootdir: /tmp/pytest-of-builduser/pytest-0/test_ok_verbose0 plugins: flake8-1.1.1 collecting ... collected 1 item test_ok_verbose.py::flake-8::FLAKE8 FAILED [100%] =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x4004467600> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4004455990> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x4004467920> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_ok_verbose0/test_ok_verbose.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED test_ok_verbose.py::flake-8::FLAKE8 - AttributeError: 'Application' ob... ============================== 1 failed in 0.38s =============================== ______________________________ test_keyword_match ______________________________ testdir = def test_keyword_match(testdir): testdir.makepyfile(""" def test_hello(): a=[ 1,123] # """) result = testdir.runpytest("--flake8", "-mflake8") > result.stdout.fnmatch_lines([ "*E201*", "*1 failed*", ]) E Failed: nomatch: '*E201*' E and: '============================= test session starts ==============================' E and: 'platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0' E and: 'rootdir: /tmp/pytest-of-builduser/pytest-0/test_keyword_match0' E and: 'plugins: flake8-1.1.1' E and: 'collected 2 items / 1 deselected / 1 selected' E and: '' E and: 'test_keyword_match.py F [100%]' E and: '' E and: '=================================== FAILURES ===================================' E and: '_________________________________ FLAKE8-check _________________________________' E and: '' E and: "cls = " E and: 'func = . at 0x40043ad1c0>' E and: "when = 'call'" E and: "reraise = (, )" E and: '' E and: ' @classmethod' E and: ' def from_call(' E and: ' cls,' E and: ' func: "Callable[[], TResult]",' E and: ' when: "Literal[\'collect\', \'setup\', \'call\', \'teardown\']",' E and: ' reraise: Optional[' E and: ' Union[Type[BaseException], Tuple[Type[BaseException], ...]]' E and: ' ] = None,' E and: ' ) -> "CallInfo[TResult]":' E and: ' """Call func, wrapping the result in a CallInfo.' E and: ' ' E and: ' :param func:' E and: ' The function to call. Called without arguments.' E and: ' :param when:' E and: ' The phase in which the function is called.' E and: ' :param reraise:' E and: ' Exception or exceptions that shall propagate if raised by the' E and: ' function, instead of being wrapped in the CallInfo.' E and: ' """' E and: ' excinfo = None' E and: ' start = timing.time()' E and: ' precise_start = timing.perf_counter()' E and: ' try:' E and: '> result: Optional[TResult] = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:341: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: ihook(item=item, **kwds), when=when, reraise=reraise' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:262: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "self = <_HookCaller 'pytest_runtest_call'>, args = ()" E and: "kwargs = {'item': }, argname = 'item', firstresult = False" E and: '' E and: ' def __call__(self, *args, **kwargs):' E and: ' if args:' E and: ' raise TypeError("hook calling supports only keyword arguments")' E and: ' assert not self.is_historic()' E and: ' ' E and: ' # This is written to avoid expensive operations when not needed.' E and: ' if self.spec:' E and: ' for argname in self.spec.argnames:' E and: ' if argname not in kwargs:' E and: ' notincall = tuple(set(self.spec.argnames) - kwargs.keys())' E and: ' warnings.warn(' E and: ' "Argument(s) {} which are declared in the hookspec "' E and: ' "can not be found in this hook call".format(notincall),' E and: ' stacklevel=2,' E and: ' )' E and: ' break' E and: ' ' E and: ' firstresult = self.spec.opts.get("firstresult")' E and: ' else:' E and: ' firstresult = False' E and: ' ' E and: '> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = <_pytest.config.PytestPluginManager object at 0x400448d490>' E and: "hook_name = 'pytest_runtest_call'" E and: "methods = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _hookexec(self, hook_name, methods, kwargs, firstresult):' E and: ' # called from all hookcaller instances.' E and: ' # enable_tracing will set its own wrapping function at self._inner_hookexec' E and: '> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:80: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "kwargs = {'item': }, firstresult = False" E and: '' E and: ' def traced_hookexec(hook_name, hook_impls, kwargs, firstresult):' E and: ' before(hook_name, hook_impls, kwargs)' E and: ' outcome = _Result.from_call(' E and: ' lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: ' after(outcome, hook_name, hook_impls, kwargs)' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:327: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "cls = " E and: 'func = .traced_hookexec.. at 0x40043ad260>' E and: '' E and: ' @classmethod' E and: ' def from_call(cls, func):' E and: ' __tracebackhide__ = True' E and: ' result = excinfo = None' E and: ' try:' E and: '> result = func()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:33: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: '> lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)' E and: ' )' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_manager.py:324: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: ' res = hook_impl.function(*args)' E and: ' if res is not None:' E and: ' results.append(res)' E and: ' if firstresult: # halt further impl calls' E and: ' break' E and: ' except BaseException:' E and: ' excinfo = sys.exc_info()' E and: ' finally:' E and: ' if firstresult: # first result hooks return a single value' E and: ' outcome = _Result(results[0] if results else None, excinfo)' E and: ' else:' E and: ' outcome = _Result(results, excinfo)' E and: ' ' E and: ' # run all wrapper post-yield blocks' E and: ' for gen in reversed(teardowns):' E and: ' try:' E and: ' gen.send(outcome)' E and: ' _raise_wrapfail(gen, "has second yield")' E and: ' except StopIteration:' E and: ' pass' E and: ' ' E and: '> return outcome.get_result()' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def get_result(self):' E and: ' """Get the result(s) for this hook call.' E and: ' ' E and: ' If the hook was marked as a ``firstresult`` only a single value' E and: ' will be returned otherwise a list of results.' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' if self._excinfo is None:' E and: ' return self._result' E and: ' else:' E and: ' ex = self._excinfo' E and: '> raise ex[1].with_traceback(ex[2])' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_result.py:60: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "hook_name = 'pytest_runtest_call'" E and: "hook_impls = [>]" E and: "caller_kwargs = {'item': }, firstresult = False" E and: '' E and: ' def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):' E and: ' """Execute a call into multiple python functions/methods and return the' E and: ' result(s).' E and: ' ' E and: ' ``caller_kwargs`` comes from _HookCaller.__call__().' E and: ' """' E and: ' __tracebackhide__ = True' E and: ' results = []' E and: ' excinfo = None' E and: ' try: # run impl and wrapper setup functions in a loop' E and: ' teardowns = []' E and: ' try:' E and: ' for hook_impl in reversed(hook_impls):' E and: ' try:' E and: ' args = [caller_kwargs[argname] for argname in hook_impl.argnames]' E and: ' except KeyError:' E and: ' for argname in hook_impl.argnames:' E and: ' if argname not in caller_kwargs:' E and: ' raise HookCallError(' E and: ' f"hook call must provide argument {argname!r}"' E and: ' )' E and: ' ' E and: ' if hook_impl.hookwrapper:' E and: ' try:' E and: ' gen = hook_impl.function(*args)' E and: ' next(gen) # first yield' E and: ' teardowns.append(gen)' E and: ' except StopIteration:' E and: ' _raise_wrapfail(gen, "did not yield")' E and: ' else:' E and: '> res = hook_impl.function(*args)' E and: '' E and: '/usr/lib/python3.11/site-packages/pluggy/_callers.py:39: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: ' item.runtest()' E and: ' except Exception as e:' E and: ' # Store trace info to allow postmortem debugging' E and: ' sys.last_type = type(e)' E and: ' sys.last_value = e' E and: ' assert e.__traceback__ is not None' E and: ' # Skip *this* frame' E and: ' sys.last_traceback = e.__traceback__.tb_next' E and: '> raise e' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:177: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'item = ' E and: '' E and: ' def pytest_runtest_call(item: Item) -> None:' E and: ' _update_current_test_var(item, "call")' E and: ' try:' E and: ' del sys.last_type' E and: ' del sys.last_value' E and: ' del sys.last_traceback' E and: ' except AttributeError:' E and: ' pass' E and: ' try:' E and: '> item.runtest()' E and: '' E and: '/usr/lib/python3.11/site-packages/_pytest/runner.py:169: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: 'self = ' E and: '' E and: ' def runtest(self):' E and: " with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \\" E and: " BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \\" E and: ' redirect_stdout(to), redirect_stderr(te):' E and: '> found_errors = check_file(' E and: ' self.fspath,' E and: ' self.flake8ignore,' E and: ' self.maxlength,' E and: ' self.maxdoclength,' E and: ' self.maxcomplexity,' E and: ' self.showsource,' E and: ' self.statistics' E and: ' )' E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: ' E and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ' E and: '' E and: "path = local('/tmp/pytest-of-builduser/pytest-0/test_keyword_match0/test_keyword_match.py')" E and: "flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = ''" E and: 'showsource = [], statistics = []' E and: '' E and: ' def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity,' E and: ' showsource, statistics):' E and: ' """Run flake8 over a single file, and return the number of failures."""' E and: ' args = []' E and: ' if maxlength:' E and: " args += ['--max-line-length', maxlength]" E and: ' if maxdoclenght:' E and: " args += ['--max-doc-length', maxdoclenght]" E and: ' if maxcomplexity:' E and: " args += ['--max-complexity', maxcomplexity]" E and: ' if showsource:' E and: " args += ['--show-source']" E and: ' if statistics:' E and: " args += ['--statistics']" E and: ' app = application.Application()' E and: '> prelim_opts, remaining_args = app.parse_preliminary_options(args)' E and: "E AttributeError: 'Application' object has no attribute 'parse_preliminary_options'" E and: '' E and: '/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError' E and: '=========================== short test summary info ============================' E and: "FAILED test_keyword_match.py::flake-8::FLAKE8 - AttributeError: 'Application'..." E and: '======================= 1 failed, 1 deselected in 0.40s ========================' E remains unmatched: '*E201*' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:149: Failed ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /tmp/pytest-of-builduser/pytest-0/test_keyword_match0 plugins: flake8-1.1.1 collected 2 items / 1 deselected / 1 selected test_keyword_match.py F [100%] =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40043ad1c0> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x400448d490> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x40043ad260> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_keyword_match0/test_keyword_match.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED test_keyword_match.py::flake-8::FLAKE8 - AttributeError: 'Application'... ======================= 1 failed, 1 deselected in 0.40s ======================== ____________________________ test_run_on_init_file _____________________________ testdir = def test_run_on_init_file(testdir): d = testdir.mkpydir("tests") result = testdir.runpytest("--flake8", d / "__init__.py") > result.assert_outcomes(passed=1) E AssertionError: assert {'errors': 0,...pped': 0, ...} == {'errors': 0,...pped': 0, ...} E Omitting 4 identical items, use -vv to show E Differing items: E {'failed': 1} != {'failed': 0} E {'passed': 0} != {'passed': 1} E Use -v to get more diff /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:159: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /tmp/pytest-of-builduser/pytest-0/test_run_on_init_file0 plugins: flake8-1.1.1 collected 1 item tests/__init__.py F [100%] =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40043afd80> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x40045e6350> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x40043afe20> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_run_on_init_file0/tests/__init__.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED tests/__init__.py::flake-8::FLAKE8 - AttributeError: 'Application' obj... ============================== 1 failed in 0.39s =============================== ______________________________ test_unicode_error ______________________________ testdir = @pytest.mark.xfail("sys.platform == 'win32'") def test_unicode_error(testdir): x = testdir.tmpdir.join("x.py") import codecs f = codecs.open(str(x), "w", encoding="utf8") > f.write(py.builtin._totext(""" # coding=utf8 accent_map = { u'\\xc0': 'a', # À -> a non-ascii comment crashes it } """, "utf8")) E AttributeError: module 'py' has no attribute 'builtin' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:167: AttributeError _____________________________ test_junit_classname _____________________________ testdir = def test_junit_classname(testdir): testdir.makepyfile("") result = testdir.runpytest("--flake8", "--junit-xml=TEST.xml") junit = testdir.tmpdir.join("TEST.xml") with open(str(junit)) as j_file: j_text = j_file.read() > result.assert_outcomes(passed=1) E AssertionError: assert {'errors': 0,...pped': 0, ...} == {'errors': 0,...pped': 0, ...} E Omitting 4 identical items, use -vv to show E Differing items: E {'failed': 1} != {'failed': 0} E {'passed': 0} != {'passed': 1} E Use -v to get more diff /build/python-pytest-flake8/src/pytest-flake8-1.1.1/test_flake8.py:192: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0 rootdir: /tmp/pytest-of-builduser/pytest-0/test_junit_classname0 plugins: flake8-1.1.1 collected 1 item test_junit_classname.py F [100%] =================================== FAILURES =================================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x4004500f40> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x400465d810> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] kwargs = {'item': }, firstresult = False def traced_hookexec(hook_name, hook_impls, kwargs, firstresult): before(hook_name, hook_impls, kwargs) outcome = _Result.from_call( lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) after(outcome, hook_name, hook_impls, kwargs) > return outcome.get_result() /usr/lib/python3.11/site-packages/pluggy/_manager.py:327: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = .traced_hookexec.. at 0x4004501f80> @classmethod def from_call(cls, func): __tracebackhide__ = True result = excinfo = None try: > result = func() /usr/lib/python3.11/site-packages/pluggy/_result.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: oldcall(hook_name, hook_impls, kwargs, firstresult) ) /usr/lib/python3.11/site-packages/pluggy/_manager.py:324: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/tmp/pytest-of-builduser/pytest-0/test_junit_classname0/test_junit_classname.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' /build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError - generated xml file: /tmp/pytest-of-builduser/pytest-0/test_junit_classname0/TEST.xml - =========================== short test summary info ============================ FAILED test_junit_classname.py::flake-8::FLAKE8 - AttributeError: 'Applicatio... ============================== 1 failed in 0.48s =============================== _________________________________ FLAKE8-check _________________________________ cls = func = . at 0x40043ada80> when = 'call' reraise = (, ) @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]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.11/site-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.11/site-packages/_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x40040373d0> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.11/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = 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 > raise ex[1].with_traceback(ex[2]) /usr/lib/python3.11/site-packages/pluggy/_result.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': }, firstresult = False def _multicall(hook_name, hook_impls, caller_kwargs, firstresult): """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( f"hook call must provide argument {argname!r}" ) 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.11/site-packages/pluggy/_callers.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: item.runtest() except Exception as e: # Store trace info to allow postmortem debugging sys.last_type = type(e) sys.last_value = e assert e.__traceback__ is not None # Skip *this* frame sys.last_traceback = e.__traceback__.tb_next > raise e /usr/lib/python3.11/site-packages/_pytest/runner.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback except AttributeError: pass try: > item.runtest() /usr/lib/python3.11/site-packages/_pytest/runner.py:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \ redirect_stdout(to), redirect_stderr(te): > found_errors = check_file( self.fspath, self.flake8ignore, self.maxlength, self.maxdoclength, self.maxcomplexity, self.showsource, self.statistics ) tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = local('/build/python-pytest-flake8/src/pytest-flake8-1.1.1/tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py') flake8ignore = [], maxlength = '', maxdoclenght = '', maxcomplexity = '' showsource = [], statistics = [] def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity, showsource, statistics): """Run flake8 over a single file, and return the number of failures.""" args = [] if maxlength: args += ['--max-line-length', maxlength] if maxdoclenght: args += ['--max-doc-length', maxdoclenght] if maxcomplexity: args += ['--max-complexity', maxcomplexity] if showsource: args += ['--show-source'] if statistics: args += ['--statistics'] app = application.Application() > prelim_opts, remaining_args = app.parse_preliminary_options(args) E AttributeError: 'Application' object has no attribute 'parse_preliminary_options' tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py:216: AttributeError =========================== short test summary info ============================ FAILED pytest_flake8.py::flake-8::FLAKE8 - AttributeError: 'Application' obje... FAILED setup.py::flake-8::FLAKE8 - AttributeError: 'Application' object has n... FAILED test_flake8.py::flake-8::FLAKE8 - AttributeError: 'Application' object... FAILED test_flake8.py::TestIgnores::test_default_flake8_ignores - AssertionEr... FAILED test_flake8.py::TestIgnores::test_ignores_all - AssertionError: assert... FAILED test_flake8.py::TestIgnores::test_w293w292 - Failed: nomatch: '*W293*' FAILED test_flake8.py::TestIgnores::test_mtime_caching - Failed: nomatch: '*W... FAILED test_flake8.py::test_ok_verbose - AssertionError: assert {'errors': 0,... FAILED test_flake8.py::test_keyword_match - Failed: nomatch: '*E201*' FAILED test_flake8.py::test_run_on_init_file - AssertionError: assert {'error... FAILED test_flake8.py::test_unicode_error - AttributeError: module 'py' has n... FAILED test_flake8.py::test_junit_classname - AssertionError: assert {'errors... FAILED tmp_install/usr/lib/python3.11/site-packages/pytest_flake8.py::flake-8::FLAKE8 =================== 13 failed, 3 passed, 1 xfailed in 10.00s =================== ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/root9/build receiving incremental file list python-pytest-flake8-1.1.1-2-riscv64-build.log python-pytest-flake8-1.1.1-2-riscv64-check.log python-pytest-flake8-1.1.1-2-riscv64-prepare.log python-pytest-flake8-1.1.1-2-x86_64-build.log python-pytest-flake8-1.1.1-2-x86_64-package.log python-pytest-flake8-1.1.1-2-x86_64-prepare.log sent 138 bytes received 16,692 bytes 33,660.00 bytes/sec total size is 289,305 speedup is 17.19