Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2736c5d

Browse files
author
Charles-François Natali
committed
Issue #12650: fix failures on some buildbots, when a subprocess takes a long
time to spawn.
2 parents ea35d39 + 72d161a commit 2736c5d

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

Lib/test/test_subprocess.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,18 +1507,6 @@ def test_zombie_fast_process_del(self):
15071507
# check that p is in the active processes list
15081508
self.assertIn(ident, [id(o) for o in subprocess._active])
15091509

1510-
# sleep a little to let the process exit, and create a new Popen: this
1511-
# should trigger the wait() of p
1512-
time.sleep(1)
1513-
with self.assertRaises(EnvironmentError) as c:
1514-
with subprocess.Popen(['nonexisting_i_hope'],
1515-
stdout=subprocess.PIPE,
1516-
stderr=subprocess.PIPE) as proc:
1517-
pass
1518-
# p should have been wait()ed on, and removed from the _active list
1519-
self.assertRaises(OSError, os.waitpid, pid, 0)
1520-
self.assertNotIn(ident, [id(o) for o in subprocess._active])
1521-
15221510
def test_leak_fast_process_del_killed(self):
15231511
# Issue #12650: on Unix, if Popen.__del__() was called before the
15241512
# process exited, and the process got killed by a signal, it would never

0 commit comments

Comments
 (0)