From 413ca8a4d097ed1a98b2d1012ca7df17aa6837b1 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 9 Apr 2020 08:53:35 +0200 Subject: [PATCH] faulthandler: trylast=True (#7025) It should happen as late as possible before the test runs. Ref: https://github.com/pytest-dev/pytest/issues/7022 --- src/_pytest/faulthandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/faulthandler.py b/src/_pytest/faulthandler.py index 8d723c206..4ca903146 100644 --- a/src/_pytest/faulthandler.py +++ b/src/_pytest/faulthandler.py @@ -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]