summaryrefslogtreecommitdiff
path: root/Lib/test/test_pty.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pty.py')
-rw-r--r--Lib/test/test_pty.py7
1 files changed, 5 insertions, 2 deletions
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()