Skip to content

TypeError in _remove_cached_results_from_failed_fixtures with pytest 5.4 #103

@The-Compiler

Description

@The-Compiler

When running the testsuite with pytest master (which is soon going to become pytest 5.4), the tests fail with:

test_rerun_on_module_fixture_with_reruns.py RER
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/florian/proj/pytest/src/_pytest/main.py", line 191, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/florian/proj/pytest/src/_pytest/main.py", line 247, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 337, in traced_hookexec
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 52, in from_call
INTERNALERROR>     result = func()
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 335, in <lambda>
INTERNALERROR>     outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/florian/proj/pytest/src/_pytest/main.py", line 272, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 337, in traced_hookexec
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 52, in from_call
INTERNALERROR>     result = func()
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 335, in <lambda>
INTERNALERROR>     outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/pytest_rerunfailures.py", line 194, in pytest_runtest_protocol
INTERNALERROR>     _remove_cached_results_from_failed_fixtures(item)
INTERNALERROR>   File "/home/florian/code/pytest-rerunfailures/.tox/py3-pytest52/lib/python3.8/site-packages/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions