Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_subprocess.py @ 84081:46fe1bb0723c 3.3
Issue #18174: Fix fd leaks in tests.
| author | Richard Oudkerk <shibturn@gmail.com> |
|---|---|
| date | Mon, 10 Jun 2013 16:29:19 +0100 |
| parents | 256b8dc71046 |
| children | f37b336bfbca 69a165d8dc98 |
line wrap: on
line diff
--- a/Lib/test/test_subprocess.py Mon Jun 10 15:38:54 2013 +0100 +++ b/Lib/test/test_subprocess.py Mon Jun 10 16:29:19 2013 +0100 @@ -1263,7 +1263,8 @@ 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):
