]> granicus.if.org Git - python/commitdiff
bpo-31160: regrtest now reaps child processes (#3044)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 9 Aug 2017 15:44:33 +0000 (17:44 +0200)
committerGitHub <noreply@github.com>
Wed, 9 Aug 2017 15:44:33 +0000 (17:44 +0200)
Add a post_test_cleanup() function which currently only calls
support.reap_children().

Lib/test/libregrtest/runtest.py

index 0210409817bb68f8128a84cd6992b4ad80c339f5..dbd463435c781bdd48b36fd9abff472bb798c775 100644 (file)
@@ -146,6 +146,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)
 
@@ -173,6 +177,7 @@ def runtest_inner(ns, test, display_failure=True):
             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)