]> granicus.if.org Git - python/commitdiff
bpo-31067: test_subprocess calls reap_children() (#2931) (#3073)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 11 Aug 2017 15:14:31 +0000 (17:14 +0200)
committerGitHub <noreply@github.com>
Fri, 11 Aug 2017 15:14:31 +0000 (17:14 +0200)
test_subprocess now also calls reap_children() in tearDown(), not
only on setUp().
(cherry picked from commit cc42c121eb5346f673247f95dac575aadb77d66c)

Lib/test/test_subprocess.py

index ce3372354cfad9abbe1329e3607ce6cd4603a7ce..a5a727efd62d4301f261b34c38623a1be94fdef9 100644 (file)
@@ -57,6 +57,8 @@ class BaseTestCase(unittest.TestCase):
             inst.wait()
         subprocess._cleanup()
         self.assertFalse(subprocess._active, "subprocess._active not empty")
+        self.doCleanups()
+        test_support.reap_children()
 
     def assertStderrEqual(self, stderr, expected, msg=None):
         # In a debug build, stuff like "[6580 refs]" is printed to stderr at