Skip to content

Commit

Permalink
mock signal registration to prevent errors when running tests under pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurbanski-reef committed Mar 27, 2024
1 parent 03fd99e commit 48b7114
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ def run(self, *args, **kwargs):


@pytest.fixture
def b2_cli(console_tool_class):
def mock_signal():
with mock.patch('signal.signal'):
yield


@pytest.fixture
def b2_cli(console_tool_class, mock_signal):
cli_tester = ConsoleToolTester()
# Because of the magic the pytest does on importing and collecting fixtures,
# ConsoleToolTester is not injected with the `unit_test_console_tool_class`
Expand Down

0 comments on commit 48b7114

Please sign in to comment.