[Python-bugs-list] test failed: test_popen2 (PR#49)
guido@CNRI.Reston.VA.US
guido@CNRI.Reston.VA.US
Tue, 10 Aug 1999 17:44:42 -0400 (EDT)
> Ran ./python ./Lib/test/test_popen2.py
> testing popen2...
> testing popen3...
> Traceback (innermost last):
> File "./Lib/test/test_popen2.py", line 16, in ?
> main()
> File "./Lib/test/test_popen2.py", line 14, in main
> popen2._test()
> File "./Lib/popen2.py", line 95, in _test
> assert not _active
> AssertionError
Thanks for reporting. This was fixed soon after 1.5.2 was released
but the fix was only publicized in the CVS tree. Here's the fix:
Index: popen2.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/popen2.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -c -r1.7 -r1.8
*** popen2.py 1998/03/26 21:12:36 1.7
--- popen2.py 1999/04/20 12:27:31 1.8
***************
*** 91,97 ****
w.close()
assert r.read() == teststr
assert e.read() == ""
! _cleanup()
assert not _active
print "All OK"
--- 91,98 ----
w.close()
assert r.read() == teststr
assert e.read() == ""
! for inst in _active[:]:
! inst.wait()
assert not _active
print "All OK"
--Guido van Rossum (home page: http://www.python.org/~guido/)