]> granicus.if.org Git - python/commitdiff
Issue #12650: fix failures on some buildbots, when a subprocess takes a long
authorCharles-François Natali <neologix@free.fr>
Thu, 18 Aug 2011 22:26:38 +0000 (00:26 +0200)
committerCharles-François Natali <neologix@free.fr>
Thu, 18 Aug 2011 22:26:38 +0000 (00:26 +0200)
time to spawn.

Lib/test/test_subprocess.py

index ef0da283edd75fc6290027b2db5d0c9ff199607d..14b1099d3f9ca8f6f32843514c1806a6c526eef9 100644 (file)
@@ -961,18 +961,6 @@ class POSIXProcessTestCase(BaseTestCase):
         # check that p is in the active processes list
         self.assertIn(ident, [id(o) for o in subprocess._active])
 
-        # sleep a little to let the process exit, and create a new Popen: this
-        # should trigger the wait() of p
-        time.sleep(1)
-        with self.assertRaises(EnvironmentError) as c:
-            with subprocess.Popen(['nonexisting_i_hope'],
-                                  stdout=subprocess.PIPE,
-                                  stderr=subprocess.PIPE) as proc:
-                pass
-        # p should have been wait()ed on, and removed from the _active list
-        self.assertRaises(OSError, os.waitpid, pid, 0)
-        self.assertNotIn(ident, [id(o) for o in subprocess._active])
-
     def test_leak_fast_process_del_killed(self):
         # Issue #12650: on Unix, if Popen.__del__() was called before the
         # process exited, and the process got killed by a signal, it would never