Skip to content

Commit

Permalink
✏️ fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MeditationDuck committed Sep 18, 2024
1 parent 502ae28 commit 887b5ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions wake/testing/pytest_plugin_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class PytestWakePluginMultiprocess:
_exception_handled: bool

_ctx_managers: List
_keyboard_interrupt: bool

def __init__(
self,
Expand All @@ -62,7 +63,7 @@ def __init__(
self._debug = debug
self._exception_handled = False

self.keyboard_interrupt = False
self._keyboard_interrupt = False
self._ctx_managers = []

def _setup_stdio(self):
Expand All @@ -89,7 +90,7 @@ def _exception_handler(
) -> None:

# After the keyboard interrupt, we do not interested in debugging.
if self.keyboard_interrupt:
if self._keyboard_interrupt:
return

self._cleanup_stdio()
Expand Down Expand Up @@ -186,7 +187,7 @@ def coverage_callback() -> None:
pickling_support.install()

def sigint_handler(signum, frame):
self.keyboard_interrupt = True
self._keyboard_interrupt = True
self._queue.put(("keyboard_interrupt", self._index))
pytest.exit("Keyboard interrupt", returncode=0)

Expand Down Expand Up @@ -236,7 +237,7 @@ def pytest_runtest_protocol(self, item, nextitem):

def pytest_runtest_logreport(self, report: pytest.TestReport):
# not sending exception report since the reason of exception is keyboard interrupt or at least triggered by keyboard interrupt
if self.keyboard_interrupt:
if self._keyboard_interrupt:
return
self._queue.put(("pytest_runtest_logreport", self._index, report))

Expand Down

0 comments on commit 887b5ee

Please sign in to comment.