diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 18:25:20 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 18:25:20 (GMT) |
commit | 9470ab43a9804928275b0a2a0860a2028af854db (patch) | |
tree | 0d0e80b501ece8add11cdfb4cfe6c5e58620ea63 /Lib/test/test_concurrent_futures.py | |
parent | 1f0ccfa853dcc68d3c2d5b92d22fa0c8e1321b63 (diff) | |
download | cpython-9470ab43a9804928275b0a2a0860a2028af854db.zip cpython-9470ab43a9804928275b0a2a0860a2028af854db.tar.gz cpython-9470ab43a9804928275b0a2a0860a2028af854db.tar.bz2 |
Make sure to reap worker threads and processes at the end of test_concurrent_futures
Diffstat (limited to 'Lib/test/test_concurrent_futures.py')
-rw-r--r-- | Lib/test/test_concurrent_futures.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py index 2662af7..6cc57f8 100644 --- a/Lib/test/test_concurrent_futures.py +++ b/Lib/test/test_concurrent_futures.py @@ -598,16 +598,20 @@ class FutureTests(unittest.TestCase): self.assertTrue(isinstance(f1.exception(timeout=5), IOError)) +@test.support.reap_threads def test_main(): - test.support.run_unittest(ProcessPoolExecutorTest, - ThreadPoolExecutorTest, - ProcessPoolWaitTests, - ThreadPoolWaitTests, - ProcessPoolAsCompletedTests, - ThreadPoolAsCompletedTests, - FutureTests, - ProcessPoolShutdownTest, - ThreadPoolShutdownTest) + try: + test.support.run_unittest(ProcessPoolExecutorTest, + ThreadPoolExecutorTest, + ProcessPoolWaitTests, + ThreadPoolWaitTests, + ProcessPoolAsCompletedTests, + ThreadPoolAsCompletedTests, + FutureTests, + ProcessPoolShutdownTest, + ThreadPoolShutdownTest) + finally: + test.support.reap_children() if __name__ == "__main__": test_main() |