diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -356,11 +356,13 @@ "Couldn't find main thread correctly in the list") if threading: - import time - TestThreadState() - t = threading.Thread(target=TestThreadState) - t.start() - t.join() + @support.reap_threads + def extra_test(): + TestThreadState() + t = threading.Thread(target=TestThreadState) + t.start() + t.join() + extra_test() if __name__ == "__main__":