diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 20:25:20 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 20:25:20 +0200 |
commit | dbfecd17cb1b6074f9d2aaa45ae3d2e9b74c9eae (patch) | |
tree | 61922da1f250e52c4266faebeb28e9a38e749cc5 /Lib/test/test_concurrent_futures.py | |
parent | 4cb3ea789edea69c3b285d863fdcb12c2388f359 (diff) | |
download | cpython-dbfecd17cb1b6074f9d2aaa45ae3d2e9b74c9eae.tar.gz |
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 2662af76cf..6cc57f85d0 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() |