From 8cdcd9eb6c01334d5e68196b2968045ff570f547 Mon Sep 17 00:00:00 2001 From: Maciej Urbanski Date: Wed, 27 Mar 2024 18:58:54 +0100 Subject: [PATCH] mock signal registration to prevent errors when running tests under pypy --- test/unit/conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/conftest.py b/test/unit/conftest.py index 8719e926..2aebc15c 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -96,6 +96,12 @@ def run(self, *args, **kwargs): return self._run_command(*args, **kwargs) +@pytest.fixture(scope="session", autouse=True) +def mock_signal(): + with mock.patch('signal.signal'): + yield + + @pytest.fixture def b2_cli(console_tool_class): cli_tester = ConsoleToolTester()