diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-06-10 15:27:45 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-06-10 15:27:45 (GMT) |
commit | 045e4579928768c0c40ae174aaa3bec1a53dc431 (patch) | |
tree | a0eced1d868f205a6aef4b2c13868ea22271968b /Lib/test/test_subprocess.py | |
parent | 0e6283e68a9d6035e68a91904f13733df512dbce (diff) | |
download | cpython-045e4579928768c0c40ae174aaa3bec1a53dc431.zip cpython-045e4579928768c0c40ae174aaa3bec1a53dc431.tar.gz cpython-045e4579928768c0c40ae174aaa3bec1a53dc431.tar.bz2 |
Issue #18174: Fix fd leaks in tests.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index e89d84f..f43b51c 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -806,7 +806,8 @@ class POSIXProcessTestCase(BaseTestCase): self._testcase.assertNotIn( fd, (p2cwrite, c2pread, errread)) finally: - map(os.close, devzero_fds) + for fd in devzero_fds: + os.close(fd) @unittest.skipIf(not os.path.exists("/dev/zero"), "/dev/zero required.") def test_preexec_errpipe_does_not_double_close_pipes(self): |