summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-07-15 18:26:35 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-07-15 18:26:35 (GMT)
commit8f629059db0b39caedd2d7ddde8a8a53e1bdea54 (patch)
treedd34c536658129c86cc2b51115bf9288b3d8e511 /Lib
parent5c1190bada8fdff2200f0aeae2773ec141ce6aa5 (diff)
parent9470ab43a9804928275b0a2a0860a2028af854db (diff)
downloadcpython-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.py22
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()