Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8189ab8

Browse files
committed
Call reap_children() where appropriate
1 parent 9c0d5ea commit 8189ab8

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

Lib/test/test_pty.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from test.support import verbose, run_unittest, import_module
1+
from test.support import verbose, run_unittest, import_module, reap_children
22

33
#Skip these tests if either fcntl or termios is not available
44
fcntl = import_module('fcntl')
@@ -195,7 +195,10 @@ def test_fork(self):
195195
# pty.fork() passed.
196196

197197
def test_main(verbose=None):
198-
run_unittest(PtyTest)
198+
try:
199+
run_unittest(PtyTest)
200+
finally:
201+
reap_children()
199202

200203
if __name__ == "__main__":
201204
test_main()

Lib/test/test_signal.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,12 @@ def test_itimer_prof(self):
484484
self.assertEqual(self.hndl_called, True)
485485

486486
def test_main():
487-
support.run_unittest(BasicSignalTests, InterProcessSignalTests,
488-
WakeupSignalTests, SiginterruptTest,
489-
ItimerTest, WindowsSignalTests)
487+
try:
488+
support.run_unittest(BasicSignalTests, InterProcessSignalTests,
489+
WakeupSignalTests, SiginterruptTest,
490+
ItimerTest, WindowsSignalTests)
491+
finally:
492+
support.reap_children()
490493

491494

492495
if __name__ == "__main__":

0 commit comments

Comments
 (0)