From b8148c4785787fd387a662aa1a40837f410b3f14 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Thu, 19 Mar 2026 23:39:24 -0400 Subject: Fix subprocess signal handling logic on linux with ash/dash Certain shells will have optimizations which will 'exec' commands directly and not spawn a subprocess, which breaks our signal test on those systems. --- tests/test_taskipy.py | 2 +- tests/test_windows.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_taskipy.py b/tests/test_taskipy.py index f269ed3..e4c3827 100644 --- a/tests/test_taskipy.py +++ b/tests/test_taskipy.py @@ -412,7 +412,7 @@ class InterruptingTaskTestCase(TaskipyTestCase): process.send_signal(signal.SIGTERM) - exit_code = process.wait() + exit_code = process.wait(timeout=5000) stdout, _ = process.communicate() self.assertEqual(exit_code, 123) diff --git a/tests/test_windows.py b/tests/test_windows.py index 0fde16d..c1d7bca 100644 --- a/tests/test_windows.py +++ b/tests/test_windows.py @@ -14,7 +14,7 @@ class WindowsTestCase(unittest.TestCase): def test_mslex_install(self): '''Ensure that mslex is installed on Windows''' try: - import mslex # type: ignore # pylint: disable=W0611,C0415 + import mslex # type: ignore # pylint: disable=W0611,C0415 # noqa: F401 except ImportError: self.fail('Unable to import mslex') -- cgit v1.2.3