diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-03-20 16:35:32 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-03-20 16:35:32 (GMT) |
commit | 8189ab85e3b53eed158998deb9d0fc15b83b70b2 (patch) | |
tree | ebecf37666d3d1fcbe0c9317d671356ac3d685a4 | |
parent | 9c0d5eaa705ca3ebaab395cc59d24d3b9c0289f4 (diff) | |
download | cpython-8189ab85e3b53eed158998deb9d0fc15b83b70b2.zip cpython-8189ab85e3b53eed158998deb9d0fc15b83b70b2.tar.gz cpython-8189ab85e3b53eed158998deb9d0fc15b83b70b2.tar.bz2 |
Call reap_children() where appropriate
-rw-r--r-- | Lib/test/test_pty.py | 7 | ||||
-rw-r--r-- | Lib/test/test_signal.py | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index 92039e4..c6fc5e7 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -1,4 +1,4 @@ -from test.support import verbose, run_unittest, import_module +from test.support import verbose, run_unittest, import_module, reap_children #Skip these tests if either fcntl or termios is not available fcntl = import_module('fcntl') @@ -195,7 +195,10 @@ class PtyTest(unittest.TestCase): # pty.fork() passed. def test_main(verbose=None): - run_unittest(PtyTest) + try: + run_unittest(PtyTest) + finally: + reap_children() if __name__ == "__main__": test_main() diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 8f9b064..f64bd4c 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -484,9 +484,12 @@ class ItimerTest(unittest.TestCase): self.assertEqual(self.hndl_called, True) def test_main(): - support.run_unittest(BasicSignalTests, InterProcessSignalTests, - WakeupSignalTests, SiginterruptTest, - ItimerTest, WindowsSignalTests) + try: + support.run_unittest(BasicSignalTests, InterProcessSignalTests, + WakeupSignalTests, SiginterruptTest, + ItimerTest, WindowsSignalTests) + finally: + support.reap_children() if __name__ == "__main__": |