summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_threading.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 5f7c0a8..0f3ac55 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -473,13 +473,15 @@ class ThreadTests(BaseTestCase):
for i in range(20):
t = threading.Thread(target=lambda: None)
t.start()
- self.addCleanup(t.join)
pid = os.fork()
if pid == 0:
- os._exit(1 if t.is_alive() else 0)
+ os._exit(11 if t.is_alive() else 10)
else:
+ t.join()
+
pid, status = os.waitpid(pid, 0)
- self.assertEqual(0, status)
+ self.assertTrue(os.WIFEXITED(status))
+ self.assertEqual(10, os.WEXITSTATUS(status))
def test_main_thread(self):
main = threading.main_thread()