diff options
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 162a72e..9cadc0f 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -575,6 +575,7 @@ class ThreadTests(BaseTestCase): self.assertFalse(t.is_alive()) # And verify the thread disposed of _tstate_lock. self.assertIsNone(t._tstate_lock) + t.join() def test_repr_stopped(self): # Verify that "stopped" shows up in repr(Thread) appropriately. @@ -601,6 +602,7 @@ class ThreadTests(BaseTestCase): break time.sleep(0.01) self.assertIn(LOOKING_FOR, repr(t)) # we waited at least 5 seconds + t.join() def test_BoundedSemaphore_limit(self): # BoundedSemaphore should raise ValueError if released too often. @@ -915,6 +917,7 @@ class ThreadingExceptionTests(BaseTestCase): thread = threading.Thread() thread.start() self.assertRaises(RuntimeError, thread.start) + thread.join() def test_joining_current_thread(self): current_thread = threading.current_thread() @@ -928,6 +931,7 @@ class ThreadingExceptionTests(BaseTestCase): thread = threading.Thread() thread.start() self.assertRaises(RuntimeError, setattr, thread, "daemon", True) + thread.join() def test_releasing_unacquired_lock(self): lock = threading.Lock() @@ -1090,6 +1094,8 @@ class TimerTests(BaseTestCase): self.callback_event.wait() self.assertEqual(len(self.callback_args), 2) self.assertEqual(self.callback_args, [((), {}), ((), {})]) + timer1.join() + timer2.join() def _callback_spy(self, *args, **kwargs): self.callback_args.append((args[:], kwargs.copy())) |