]> granicus.if.org Git - python/commitdiff
bpo-31067: test_subprocess calls reap_children() (#2931) (#3074)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 11 Aug 2017 15:14:37 +0000 (17:14 +0200)
committerGitHub <noreply@github.com>
Fri, 11 Aug 2017 15:14:37 +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 4faf32e6361eafc8b9d5686a2d46eb477ed2d21b..004f1f01ab50466748eeecb25c77337d08be456b 100644 (file)
@@ -61,6 +61,8 @@ class BaseTestCase(unittest.TestCase):
             inst.wait()
         subprocess._cleanup()
         self.assertFalse(subprocess._active, "subprocess._active not empty")
+        self.doCleanups()
+        support.reap_children()
 
     def assertStderrEqual(self, stderr, expected, msg=None):
         # In a debug build, stuff like "[6580 refs]" is printed to stderr at