diff options
| author | Richard Oudkerk <shibturn@gmail.com> | 2013-06-10 15:29:19 (GMT) |
|---|---|---|
| committer | Richard Oudkerk <shibturn@gmail.com> | 2013-06-10 15:29:19 (GMT) |
| commit | 0e547b66dc206e46b69b91790aa73010290f4fcb (patch) | |
| tree | cf442ea4095917191e05cdad750efd5cd43dac1c /Lib/test/test_subprocess.py | |
| parent | 409f90237c07d2365f6e0b527071e74415c073f3 (diff) | |
| download | cpython-0e547b66dc206e46b69b91790aa73010290f4fcb.zip cpython-0e547b66dc206e46b69b91790aa73010290f4fcb.tar.gz cpython-0e547b66dc206e46b69b91790aa73010290f4fcb.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 901d4df..4b90471 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1263,7 +1263,8 @@ class POSIXProcessTestCase(BaseTestCase): self.stderr.fileno()), msg="At least one fd was closed early.") 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): |
