faulthandler: trylast=True (#7025)

It should happen as late as possible before the test runs.

Ref: https://github.com/pytest-dev/pytest/issues/7022
This commit is contained in:
Daniel Hahler
2020-04-09 08:53:35 +02:00
committed by GitHub
parent eb00182061
commit 413ca8a4d0

View File

@@ -80,7 +80,7 @@ class FaultHandlerHooks:
def get_timeout_config_value(config):
return float(config.getini("faulthandler_timeout") or 0.0)
@pytest.hookimpl(hookwrapper=True)
@pytest.hookimpl(hookwrapper=True, trylast=True)
def pytest_runtest_protocol(self, item):
timeout = self.get_timeout_config_value(item.config)
stderr = item.config._store[fault_handler_stderr_key]