From: Antoine Pitrou Date: Sun, 20 Mar 2011 16:35:32 +0000 (+0100) Subject: Call reap_children() where appropriate X-Git-Tag: v3.2.1b1~247^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8189ab85e3b53eed158998deb9d0fc15b83b70b2;p=python Call reap_children() where appropriate --- diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index 92039e44ed..c6fc5e7da7 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 8f9b0643c1..f64bd4c99a 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__":