diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 18:26:35 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 18:26:35 (GMT) |
commit | 8f629059db0b39caedd2d7ddde8a8a53e1bdea54 (patch) | |
tree | dd34c536658129c86cc2b51115bf9288b3d8e511 /Lib | |
parent | 5c1190bada8fdff2200f0aeae2773ec141ce6aa5 (diff) | |
parent | 9470ab43a9804928275b0a2a0860a2028af854db (diff) | |
download | cpython-8f629059db0b39caedd2d7ddde8a8a53e1bdea54.zip cpython-8f629059db0b39caedd2d7ddde8a8a53e1bdea54.tar.gz cpython-8f629059db0b39caedd2d7ddde8a8a53e1bdea54.tar.bz2 |
Make sure to reap worker threads and processes at the end of test_concurrent_futures
Diffstat (limited to 'Lib')
-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 fda6f5b..222bd54 100644 --- a/Lib/test/test_concurrent_futures.py +++ b/Lib/test/test_concurrent_futures.py @@ -623,16 +623,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() |