]> granicus.if.org Git - python/commitdiff
Call reap_children() where appropriate
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 20 Mar 2011 16:35:32 +0000 (17:35 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 20 Mar 2011 16:35:32 +0000 (17:35 +0100)
Lib/test/test_pty.py
Lib/test/test_signal.py

index 92039e44ed1fbc4ca53021e33ccbb5d89d69b54c..c6fc5e7da75de7435da16bf0b52d30c8f468ea14 100644 (file)
@@ -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()
index 8f9b0643c116cf26dc6bbb2609f47f0d84ac5271..f64bd4c99ad6442486d0c6c69fbfb26640dc9010 100644 (file)
@@ -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__":