[Python-Dev] test_subprocess fails on OSX

Peter Astrand astrand at lysator.liu.se
Wed Oct 13 19:50:54 CEST 2004

On Thu, 14 Oct 2004, Anthony Baxter wrote:

> On OSX 10.3.4, test_subprocess is failing intermittently when run
> from regrtest:
> test_subprocess
>      this bit of output is from a test of stdout in a different process ...
> test test_subprocess failed -- Traceback (most recent call last):
>    File "/Users/anthonybaxter/pyhead/src/Lib/test/test_subprocess.py",
> line 434, in test_close_fds
>      self.assertEqual(p.stdout.read(), "3")
> AssertionError: '4' != '3'
> Running just the test by itself works. I'm guessing it could be part of
> the test suite leaking a FD or something?

That shouldn't matter, since when you are using close_fds=True, the
subprocess module will close all filedescriptors. For example, you can
insert additional lines with os.pipe() at the beginning of test_close_fds,
and the test (should) still succeed(s).

/Peter Åstrand <astrand at lysator.liu.se>

More information about the Python-Dev mailing list