[New-bugs-announce] [issue8614] test_gzip fails on OS X
Mark Dickinson
report at bugs.python.org
Tue May 4 20:18:04 CEST 2010
New submission from Mark Dickinson <dickinsm at gmail.com>:
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]
----------
components: Library (Lib)
messages: 104965
nosy: mark.dickinson, pitrou
priority: normal
severity: normal
status: open
title: test_gzip fails on OS X
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8614>
_______________________________________
More information about the New-bugs-announce
mailing list