diff options
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 546773e..08c0ccd 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -907,6 +907,13 @@ class ThreadTests(BaseTestCase): thread.join() self.assertTrue(target.ran) + def test_leak_without_join(self): + # bpo-37788: Test that a thread which is not joined explicitly + # does not leak. Test written for reference leak checks. + def noop(): pass + with threading_helper.wait_threads_exit(): + threading.Thread(target=noop).start() + # Thread.join() is not called class ThreadJoinOnShutdown(BaseTestCase): |