[Python-checkins] cpython (3.1): Call reap_children() where appropriate
antoine.pitrou
python-checkins at python.org
Sun Mar 20 17:43:00 CET 2011
http://hg.python.org/cpython/rev/154b1e20e62b
changeset: 68758:154b1e20e62b
branch: 3.1
parent: 68752:88876a264ebe
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Mar 20 17:35:32 2011 +0100
summary:
Call reap_children() where appropriate
files:
Lib/test/test_pty.py
Lib/test/test_signal.py
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py
--- 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 @@
# 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
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -484,9 +484,12 @@
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__":
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list