diff options
Diffstat (limited to 'Lib/test/test_threadsignals.py')
-rw-r--r-- | Lib/test/test_threadsignals.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_threadsignals.py b/Lib/test/test_threadsignals.py index 286c2e420f..2f7eb607c7 100644 --- a/Lib/test/test_threadsignals.py +++ b/Lib/test/test_threadsignals.py @@ -1,14 +1,14 @@ """PyUnit testing that threads honor our signal semantics""" import unittest -import thread import signal import os import sys -from test.test_support import run_unittest, TestSkipped +from test.test_support import run_unittest, import_module, reap_threads +thread = import_module('thread') if sys.platform[:3] in ('win', 'os2') or sys.platform=='riscos': - raise TestSkipped, "Can't test signal on %s" % sys.platform + raise unittest.SkipTest, "Can't test signal on %s" % sys.platform process_pid = os.getpid() signalled_all=thread.allocate_lock() @@ -39,6 +39,7 @@ class ThreadSignals(unittest.TestCase): wait for it to finish. Check that we got both signals and that they were run by the main thread. """ + @reap_threads def test_signals(self): signalled_all.acquire() self.spawnSignallingThread() |