[Python-checkins] cpython (merge 3.2 -> default): Make sure to reap worker threads and processes at the end of
antoine.pitrou
python-checkins at python.org
Fri Jul 15 20:28:25 CEST 2011
http://hg.python.org/cpython/rev/88de447abd0d
changeset: 71346:88de447abd0d
parent: 71344:e79b21476fef
parent: 71345:a19e99625c8a
user: Antoine Pitrou <solipsis at pitrou.net>
date: Fri Jul 15 20:26:35 2011 +0200
summary:
Make sure to reap worker threads and processes at the end of test_concurrent_futures
files:
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
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -623,16 +623,20 @@
self.assertTrue(isinstance(f1.exception(timeout=5), IOError))
+ at 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()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list