From 959dc5a9e554e4728ae11d5cf508838785a33f9b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 6 Jun 2025 10:53:38 +0200 Subject: [PATCH] tests: Correctly deactivate SignalHandler after tests Otherwise, the python_hacks timer might continue running and affects test_early_timeout_check, similiarly to what was fixed in 74c7ff2641979ec18e32e3e76fc9a1e3cb21f93d. --- tests/unit/misc/test_crashsignal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/misc/test_crashsignal.py b/tests/unit/misc/test_crashsignal.py index 7019118e5..0b77474b9 100644 --- a/tests/unit/misc/test_crashsignal.py +++ b/tests/unit/misc/test_crashsignal.py @@ -37,8 +37,8 @@ def signal_handler(qtbot, mocker, read_config_mock): app=mocker.Mock(spec=QApplication), quitter=mocker.Mock(spec=quitter.Quitter), ) - - return signal_handler + yield signal_handler + signal_handler.deactivate() def test_handlers_registered(signal_handler):