]> granicus.if.org Git - python/commitdiff
bpo-31067: test_subprocess calls reap_children() (#2931)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 28 Jul 2017 16:00:22 +0000 (18:00 +0200)
committerGitHub <noreply@github.com>
Fri, 28 Jul 2017 16:00:22 +0000 (18:00 +0200)
test_subprocess now also calls reap_children() in tearDown(), not
only on setUp().

Lib/test/test_subprocess.py

index 4052c5ef5251dc0dbafcb4484aa7f21426f99fa7..a99976aa56f756473575d080c9056eb02702a35e 100644 (file)
@@ -56,6 +56,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