Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due

to open door files.
This commit is contained in:
Antoine Pitrou 2011-02-21 21:55:48 +00:00
parent 5ed8b2c737
commit ce58dc7b16
3 changed files with 15 additions and 19 deletions

View file

@ -1156,9 +1156,6 @@ class POSIXProcessTestCase(BaseTestCase):
open_fds = set()
if support.verbose:
print(" -- maxfd =", subprocess.MAXFD)
for x in range(5):
fds = os.pipe()
self.addCleanup(os.close, fds[0])
@ -1173,10 +1170,6 @@ class POSIXProcessTestCase(BaseTestCase):
remaining_fds = set(map(int, output.split(b',')))
to_be_closed = open_fds - {fd}
# Temporary debug output for intermittent failures
if support.verbose:
print(" -- fds that should have been closed:", to_be_closed)
print(" -- fds that remained open:", remaining_fds)
self.assertIn(fd, remaining_fds, "fd to be passed not passed")
self.assertFalse(remaining_fds & to_be_closed,