Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 Lib/test/libregrtest/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def runtest(ns, test):
runtest.stringio = None


def post_test_cleanup():
support.reap_children()


def runtest_inner(ns, test, display_failure=True):
support.unload(test)

Expand Down Expand Up @@ -170,6 +174,7 @@ def test_runner():
if ns.huntrleaks:
refleak = dash_R(the_module, test, test_runner, ns.huntrleaks)
test_time = time.time() - start_time
post_test_cleanup()
except support.ResourceDenied as msg:
if not ns.quiet and not ns.pgo:
print(test, "skipped --", msg, flush=True)
Expand Down
4 changes: 4 additions & 0 deletions 4 Lib/test/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,10 @@ def run_child(self, child, terminal_input):
self.fail("got %d lines in pipe but expected 2, child output was:\n%s"
% (len(lines), child_output))
os.close(fd)

pid, status = os.waitpid(pid, 0)
self.assertEqual(status, 0)

return lines

def check_input_tty(self, prompt, terminal_input, stdio_encoding=None):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.