Source: pytest-rerunfailures Version: 8.0-2 Severity: important User: pyt...@packages.debian.org Usertags: pytest-v6
Hi, pytest-rerunfailures FTBFS with pytest 6 in experimental. The pytest changelog may offer clues as to why: https://docs.pytest.org/en/stable/changelog.html The error log below has more details. > I: pybuild base:232: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build; python3.9 > -m pytest > ============================= test session starts > ============================== > platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0 > rootdir: /<<PKGBUILDDIR>> > plugins: rerunfailures-8.0 > collected 37 items > > test_pytest_rerunfailures.py ..............................FFFF... > [100%] > > =================================== FAILURES > =================================== > _______________ test_rerun_on_setup_class_with_error_with_reruns > _______________ > > testdir = <Testdir > local('/tmp/pytest-of-christian/pytest-0/test_rerun_on_setup_class_with_error_with_reruns0')> > > def test_rerun_on_setup_class_with_error_with_reruns(testdir): > """ > Case: setup_class throwing error on the first execution for > parametrized test > """ > testdir.makepyfile(""" > import pytest > > pass_fixture = False > > class TestFoo(object): > @classmethod > def setup_class(cls): > global pass_fixture > if not pass_fixture: > pass_fixture = True > assert False > assert True > @pytest.mark.parametrize('param', [1, 2, 3]) > def test_pass(self, param): > assert param""") > result = testdir.runpytest('--reruns', '1') >> assert_outcomes(result, passed=3, rerun=1) > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:294: > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:27: > in assert_outcomes > outcomes = result.parseoutcomes() > /usr/lib/python3/dist-packages/_pytest/pytester.py:461: in parseoutcomes > return self.parse_summary_nouns(self.outlines) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > cls = <class '_pytest.pytester.RunResult'> > lines = ['============================= test session starts > ==============================', 'platform linux -- Python 3.9.1, > ...ytest-0/test_rerun_on_setup_class_with_error_with_reruns0', 'plugins: > rerunfailures-8.0', 'collected 3 items', '', ...] > > @classmethod > def parse_summary_nouns(cls, lines) -> Dict[str, int]: > """Extracts the nouns from a pytest terminal summary line. > > It always returns the plural noun for consistency:: > > ======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ==== > > Will return ``{"failed": 1, "passed": 1, "warnings": 1, "errors": 1}`` > """ > for line in reversed(lines): > if rex_session_duration.search(line): > outcomes = rex_outcome.findall(line) > ret = {noun: int(count) for (count, noun) in outcomes} > break > else: >> raise ValueError("Pytest terminal summary report not found") > E ValueError: Pytest terminal summary report not found > > /usr/lib/python3/dist-packages/_pytest/pytester.py:479: ValueError > ----------------------------- Captured stdout call > ----------------------------- > ============================= test session starts > ============================== > platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0 > rootdir: > /tmp/pytest-of-christian/pytest-0/test_rerun_on_setup_class_with_error_with_reruns0 > plugins: rerunfailures-8.0 > collected 3 items > > test_rerun_on_setup_class_with_error_with_reruns.py R > INTERNALERROR> Traceback (most recent call last): > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 240, in wrap_session > INTERNALERROR> session.exitstatus = doit(config, session) or 0 > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 296, in _main > INTERNALERROR> config.hook.pytest_runtestloop(session=session) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 321, in pytest_runtestloop > INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, > nextitem=nextitem) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 194, in pytest_runtest_protocol > INTERNALERROR> _remove_cached_results_from_failed_fixtures(item) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 135, in _remove_cached_results_from_failed_fixtures > INTERNALERROR> result, cache_key, err = getattr(fixture_def, > cached_result) > INTERNALERROR> TypeError: cannot unpack non-iterable NoneType object > ----------------------------- Captured stderr call > ----------------------------- > Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/_pytest/pytester.py", line 1004, in > runpytest_inprocess > reprec = self.inline_run(*args, **kwargs) > File "/usr/lib/python3/dist-packages/_pytest/pytester.py", line 970, in > inline_run > ret = pytest.main(list(args), plugins=plugins) > File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 157, > in main > ret = config.hook.pytest_cmdline_main( > File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__ > return self._hookexec(self, self.get_hookimpls(), kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in > _hookexec > return self._inner_hookexec(hook, methods, kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in > <lambda> > self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 208, in > _multicall > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in > _multicall > res = hook_impl.function(*args) > File "/usr/lib/python3/dist-packages/_pytest/main.py", line 289, in > pytest_cmdline_main > return wrap_session(config, _main) > File "/usr/lib/python3/dist-packages/_pytest/main.py", line 277, in > wrap_session > config.hook.pytest_sessionfinish( > File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__ > return self._hookexec(self, self.get_hookimpls(), kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in > _hookexec > return self._inner_hookexec(hook, methods, kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 335, in > traced_hookexec > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 52, in > from_call > result = func() > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 333, in > <lambda> > outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs)) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in > <lambda> > self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 203, in > _multicall > gen.send(outcome) > File "/usr/lib/python3/dist-packages/_pytest/terminal.py", line 803, in > pytest_sessionfinish > outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in > _multicall > res = hook_impl.function(*args) > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 94, in > pytest_sessionfinish > session._setupstate.teardown_all() > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 395, in > teardown_all > self._pop_and_teardown() > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 370, in > _pop_and_teardown > self._teardown_with_finalization(colitem) > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 388, in > _teardown_with_finalization > self._callfinalizers(colitem) > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 385, in > _callfinalizers > raise exc > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 378, in > _callfinalizers > fin() > File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 1026, in > finish > hook.pytest_fixture_post_finalizer(fixturedef=self, request=request) > File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__ > return self._hookexec(self, self.get_hookimpls(), kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in > _hookexec > return self._inner_hookexec(hook, methods, kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 335, in > traced_hookexec > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 52, in > from_call > result = func() > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 333, in > <lambda> > outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs)) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in > <lambda> > self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 208, in > _multicall > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in > _multicall > res = hook_impl.function(*args) > File "/usr/lib/python3/dist-packages/_pytest/setuponly.py", line 51, in > pytest_fixture_post_finalizer > if fixturedef.cached_result is not None: > AttributeError: 'FixtureDef' object has no attribute 'cached_result' > ___________ test_rerun_on_class_scope_fixture_with_error_with_reruns > ___________ > > testdir = <Testdir > local('/tmp/pytest-of-christian/pytest-0/test_rerun_on_class_scope_fixture_with_error_with_reruns0')> > > def test_rerun_on_class_scope_fixture_with_error_with_reruns(testdir): > """ > Case: Class scope fixture throwing error on the first execution for > parametrized test > """ > testdir.makepyfile(""" > import pytest > > pass_fixture = False > > class TestFoo(object): > > @pytest.fixture(scope="class") > def setup_fixture(self): > global pass_fixture > if not pass_fixture: > pass_fixture = True > assert False > assert True > @pytest.mark.parametrize('param', [1, 2, 3]) > def test_pass(self, setup_fixture, param): > assert param""") > result = testdir.runpytest('--reruns', '1') >> assert_outcomes(result, passed=3, rerun=1) > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:319: > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:27: > in assert_outcomes > outcomes = result.parseoutcomes() > /usr/lib/python3/dist-packages/_pytest/pytester.py:461: in parseoutcomes > return self.parse_summary_nouns(self.outlines) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > cls = <class '_pytest.pytester.RunResult'> > lines = ['============================= test session starts > ==============================', 'platform linux -- Python 3.9.1, > ...test_rerun_on_class_scope_fixture_with_error_with_reruns0', 'plugins: > rerunfailures-8.0', 'collected 3 items', '', ...] > > @classmethod > def parse_summary_nouns(cls, lines) -> Dict[str, int]: > """Extracts the nouns from a pytest terminal summary line. > > It always returns the plural noun for consistency:: > > ======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ==== > > Will return ``{"failed": 1, "passed": 1, "warnings": 1, "errors": 1}`` > """ > for line in reversed(lines): > if rex_session_duration.search(line): > outcomes = rex_outcome.findall(line) > ret = {noun: int(count) for (count, noun) in outcomes} > break > else: >> raise ValueError("Pytest terminal summary report not found") > E ValueError: Pytest terminal summary report not found > > /usr/lib/python3/dist-packages/_pytest/pytester.py:479: ValueError > ----------------------------- Captured stdout call > ----------------------------- > ============================= test session starts > ============================== > platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0 > rootdir: > /tmp/pytest-of-christian/pytest-0/test_rerun_on_class_scope_fixture_with_error_with_reruns0 > plugins: rerunfailures-8.0 > collected 3 items > > test_rerun_on_class_scope_fixture_with_error_with_reruns.py R > INTERNALERROR> Traceback (most recent call last): > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 240, in wrap_session > INTERNALERROR> session.exitstatus = doit(config, session) or 0 > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 296, in _main > INTERNALERROR> config.hook.pytest_runtestloop(session=session) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 321, in pytest_runtestloop > INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, > nextitem=nextitem) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 194, in pytest_runtest_protocol > INTERNALERROR> _remove_cached_results_from_failed_fixtures(item) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 135, in _remove_cached_results_from_failed_fixtures > INTERNALERROR> result, cache_key, err = getattr(fixture_def, > cached_result) > INTERNALERROR> TypeError: cannot unpack non-iterable NoneType object > ----------------------------- Captured stderr call > ----------------------------- > Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/_pytest/pytester.py", line 1004, in > runpytest_inprocess > reprec = self.inline_run(*args, **kwargs) > File "/usr/lib/python3/dist-packages/_pytest/pytester.py", line 970, in > inline_run > ret = pytest.main(list(args), plugins=plugins) > File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 157, > in main > ret = config.hook.pytest_cmdline_main( > File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__ > return self._hookexec(self, self.get_hookimpls(), kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in > _hookexec > return self._inner_hookexec(hook, methods, kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in > <lambda> > self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 208, in > _multicall > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in > _multicall > res = hook_impl.function(*args) > File "/usr/lib/python3/dist-packages/_pytest/main.py", line 289, in > pytest_cmdline_main > return wrap_session(config, _main) > File "/usr/lib/python3/dist-packages/_pytest/main.py", line 277, in > wrap_session > config.hook.pytest_sessionfinish( > File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__ > return self._hookexec(self, self.get_hookimpls(), kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in > _hookexec > return self._inner_hookexec(hook, methods, kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 335, in > traced_hookexec > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 52, in > from_call > result = func() > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 333, in > <lambda> > outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs)) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in > <lambda> > self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 203, in > _multicall > gen.send(outcome) > File "/usr/lib/python3/dist-packages/_pytest/terminal.py", line 803, in > pytest_sessionfinish > outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in > _multicall > res = hook_impl.function(*args) > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 94, in > pytest_sessionfinish > session._setupstate.teardown_all() > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 395, in > teardown_all > self._pop_and_teardown() > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 370, in > _pop_and_teardown > self._teardown_with_finalization(colitem) > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 388, in > _teardown_with_finalization > self._callfinalizers(colitem) > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 385, in > _callfinalizers > raise exc > File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 378, in > _callfinalizers > fin() > File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 1026, in > finish > hook.pytest_fixture_post_finalizer(fixturedef=self, request=request) > File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__ > return self._hookexec(self, self.get_hookimpls(), kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in > _hookexec > return self._inner_hookexec(hook, methods, kwargs) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 335, in > traced_hookexec > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 52, in > from_call > result = func() > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 333, in > <lambda> > outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs)) > File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in > <lambda> > self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 208, in > _multicall > return outcome.get_result() > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in > get_result > raise ex[1].with_traceback(ex[2]) > File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in > _multicall > res = hook_impl.function(*args) > File "/usr/lib/python3/dist-packages/_pytest/setuponly.py", line 51, in > pytest_fixture_post_finalizer > if fixturedef.cached_result is not None: > AttributeError: 'FixtureDef' object has no attribute 'cached_result' > ___________________ test_rerun_on_module_fixture_with_reruns > ___________________ > > testdir = <Testdir > local('/tmp/pytest-of-christian/pytest-0/test_rerun_on_module_fixture_with_reruns0')> > > def test_rerun_on_module_fixture_with_reruns(testdir): > """ > Case: Module scope fixture is not re-executed when class scope > fixture throwing error on the first execution > for parametrized test > """ > testdir.makepyfile(""" > import pytest > > pass_fixture = False > > @pytest.fixture(scope='module') > def module_fixture(): > assert not pass_fixture > > class TestFoo(object): > @pytest.fixture(scope="class") > def setup_fixture(self): > global pass_fixture > if not pass_fixture: > pass_fixture = True > assert False > assert True > def test_pass_1(self, module_fixture, setup_fixture): > assert True > > def test_pass_2(self, module_fixture, setup_fixture): > assert True""") > result = testdir.runpytest('--reruns', '1') >> assert_outcomes(result, passed=2, rerun=1) > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:350: > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > result = <RunResult ret=ExitCode.INTERNAL_ERROR len(stdout.lines)=61 > len(stderr.lines)=0 duration=0.30s> > passed = 2, skipped = 0, failed = 0, error = 0, xfailed = 0, xpassed = 0 > rerun = 1 > > def assert_outcomes(result, passed=1, skipped=0, failed=0, error=0, > xfailed=0, > xpassed=0, rerun=0): > outcomes = result.parseoutcomes() >> assert outcomes.get('passed', 0) == passed > E AssertionError: assert 0 == 2 > E + where 0 = <built-in method get of dict object at > 0x7f2a77e0a980>('passed', 0) > E + where <built-in method get of dict object at 0x7f2a77e0a980> = > {'errors': 1, 'rerun': 2}.get > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:28: > AssertionError > ----------------------------- Captured stdout call > ----------------------------- > ============================= test session starts > ============================== > platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0 > rootdir: > /tmp/pytest-of-christian/pytest-0/test_rerun_on_module_fixture_with_reruns0 > plugins: rerunfailures-8.0 > collected 2 items > > test_rerun_on_module_fixture_with_reruns.py RER > INTERNALERROR> Traceback (most recent call last): > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 240, in wrap_session > INTERNALERROR> session.exitstatus = doit(config, session) or 0 > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 296, in _main > INTERNALERROR> config.hook.pytest_runtestloop(session=session) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 321, in pytest_runtestloop > INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, > nextitem=nextitem) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 194, in pytest_runtest_protocol > INTERNALERROR> _remove_cached_results_from_failed_fixtures(item) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 135, in _remove_cached_results_from_failed_fixtures > INTERNALERROR> result, cache_key, err = getattr(fixture_def, > cached_result) > INTERNALERROR> TypeError: cannot unpack non-iterable NoneType object > > ========================== 1 error, 2 rerun in 0.28s > =========================== > __________________ test_rerun_on_session_fixture_with_reruns > ___________________ > > testdir = <Testdir > local('/tmp/pytest-of-christian/pytest-0/test_rerun_on_session_fixture_with_reruns0')> > > def test_rerun_on_session_fixture_with_reruns(testdir): > """ > Case: Module scope fixture is not re-executed when class scope > fixture throwing error on the first execution > for parametrized test > """ > testdir.makepyfile(""" > import pytest > > pass_fixture = False > > @pytest.fixture(scope='session') > def session_fixture(): > assert not pass_fixture > > class TestFoo(object): > @pytest.fixture(scope="class") > def setup_fixture(self): > global pass_fixture > if not pass_fixture: > pass_fixture = True > assert False > assert True > > def test_pass_1(self, session_fixture, setup_fixture): > assert True > def test_pass_2(self, session_fixture, setup_fixture): > assert True""") > result = testdir.runpytest('--reruns', '1') >> assert_outcomes(result, passed=2, rerun=1) > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:381: > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > result = <RunResult ret=ExitCode.INTERNAL_ERROR len(stdout.lines)=61 > len(stderr.lines)=0 duration=0.30s> > passed = 2, skipped = 0, failed = 0, error = 0, xfailed = 0, xpassed = 0 > rerun = 1 > > def assert_outcomes(result, passed=1, skipped=0, failed=0, error=0, > xfailed=0, > xpassed=0, rerun=0): > outcomes = result.parseoutcomes() >> assert outcomes.get('passed', 0) == passed > E AssertionError: assert 0 == 2 > E + where 0 = <built-in method get of dict object at > 0x7f2a776ba900>('passed', 0) > E + where <built-in method get of dict object at 0x7f2a776ba900> = > {'errors': 1, 'rerun': 2}.get > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/test_pytest_rerunfailures.py:28: > AssertionError > ----------------------------- Captured stdout call > ----------------------------- > ============================= test session starts > ============================== > platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0 > rootdir: > /tmp/pytest-of-christian/pytest-0/test_rerun_on_session_fixture_with_reruns0 > plugins: rerunfailures-8.0 > collected 2 items > > test_rerun_on_session_fixture_with_reruns.py RER > INTERNALERROR> Traceback (most recent call last): > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 240, in wrap_session > INTERNALERROR> session.exitstatus = doit(config, session) or 0 > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 296, in _main > INTERNALERROR> config.hook.pytest_runtestloop(session=session) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File "/usr/lib/python3/dist-packages/_pytest/main.py", line > 321, in pytest_runtestloop > INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, > nextitem=nextitem) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line > 286, in __call__ > INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 92, in _hookexec > INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 335, in traced_hookexec > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 52, in from_call > INTERNALERROR> result = func() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 333, in <lambda> > INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, > hook_impls, kwargs)) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/manager.py", > line 83, in <lambda> > INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: > hook.multicall( > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 208, in _multicall > INTERNALERROR> return outcome.get_result() > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 80, in get_result > INTERNALERROR> raise ex[1].with_traceback(ex[2]) > INTERNALERROR> File "/usr/lib/python3/dist-packages/pluggy/callers.py", > line 187, in _multicall > INTERNALERROR> res = hook_impl.function(*args) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 194, in pytest_runtest_protocol > INTERNALERROR> _remove_cached_results_from_failed_fixtures(item) > INTERNALERROR> File > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build/pytest_rerunfailures.py", > line 135, in _remove_cached_results_from_failed_fixtures > INTERNALERROR> result, cache_key, err = getattr(fixture_def, > cached_result) > INTERNALERROR> TypeError: cannot unpack non-iterable NoneType object > > ========================== 1 error, 2 rerun in 0.28s > =========================== > =========================== short test summary info > ============================ > FAILED > test_pytest_rerunfailures.py::test_rerun_on_setup_class_with_error_with_reruns > FAILED > test_pytest_rerunfailures.py::test_rerun_on_class_scope_fixture_with_error_with_reruns > FAILED test_pytest_rerunfailures.py::test_rerun_on_module_fixture_with_reruns > FAILED test_pytest_rerunfailures.py::test_rerun_on_session_fixture_with_reruns > ========================= 4 failed, 33 passed in 1.67s > ========================= > E: pybuild pybuild:353: test: plugin distutils failed with: exit code=1: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pytest-rerunfailures/build; python3.9 > -m pytest > dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.9 > returned exit code 13 > make: *** [debian/rules:7: binary] Error 25 > dpkg-buildpackage: error: debian/rules binary subprocess returned exit status > 2