test_buffered_reader test_gzip is failing for me since r80720, on trunk on OS X 10.6.3:
======================================================================
ERROR: test_buffered_reader (__main__.TestGzip)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib/test/test_gzip.py", line 91, in test_buffered_reader
lines = [line for line in r]
File "/Users/dickinsm/python/svn/trunk/Lib/gzip.py", line 365, in flush
self.fileobj.flush()
IOError: [Errno 9] Bad file descriptor
----------------------------------------------------------------------
Ran 16 tests in 1.258s
FAILED (errors=1)
Traceback (most recent call last):
File "Lib/test/test_gzip.py", line 271, in <module>
test_main(verbose=True)
File "Lib/test/test_gzip.py", line 268, in test_main
test_support.run_unittest(TestGzip)
File "/Users/dickinsm/python/svn/trunk/Lib/test/test_support.py", line 1038, in run_unittest
_run_suite(suite)
File "/Users/dickinsm/python/svn/trunk/Lib/test/test_support.py", line 1021, in _run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
File "Lib/test/test_gzip.py", line 91, in test_buffered_reader
lines = [line for line in r]
File "/Users/dickinsm/python/svn/trunk/Lib/gzip.py", line 365, in flush
self.fileobj.flush()
IOError: [Errno 9] Bad file descriptor
Here's a minimal Python script that produces the failure:
import gzip
import io
f = gzip.GzipFile('hamster', 'wb')
f.write("some data")
f.close()
f = gzip.GzipFile('hamster', 'rb')
r = io.BufferedReader(f)
lines = [line for line in r]
r.close()
This gives the following output:
Traceback (most recent call last):
File "test_gzip.py", line 11, in <module>
r.close()
File "/Users/dickinsm/python/svn/trunk/Lib/gzip.py", line 365, in flush
self.fileobj.flush()
IOError: [Errno 9] Bad file descriptor
[20213 refs]
|