summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2013-06-10 15:27:45 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2013-06-10 15:27:45 (GMT)
commit045e4579928768c0c40ae174aaa3bec1a53dc431 (patch)
treea0eced1d868f205a6aef4b2c13868ea22271968b /Lib/test/test_subprocess.py
parent0e6283e68a9d6035e68a91904f13733df512dbce (diff)
downloadcpython-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.py3
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):