diff options
author | Georg Brandl <georg@python.org> | 2013-05-12 09:57:26 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-05-12 09:57:26 (GMT) |
commit | b3bd624a55ea5bf3a0e77cfa9d987d82ed23652f (patch) | |
tree | 6f3eec34ee852fdb40cf731f2c422d4831fd2e15 /Lib/test/test_gzip.py | |
parent | 64949fa20e4845e92a1d42f581a47b559a9acd25 (diff) | |
download | cpython-b3bd624a55ea5bf3a0e77cfa9d987d82ed23652f.zip cpython-b3bd624a55ea5bf3a0e77cfa9d987d82ed23652f.tar.gz cpython-b3bd624a55ea5bf3a0e77cfa9d987d82ed23652f.tar.bz2 |
Back out patch for #1159051, which caused backwards compatibility problems.
Diffstat (limited to 'Lib/test/test_gzip.py')
-rwxr-xr-x[-rw-r--r--] | Lib/test/test_gzip.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py index 37fe853..5eac921 100644..100755 --- a/Lib/test/test_gzip.py +++ b/Lib/test/test_gzip.py @@ -389,20 +389,6 @@ class TestGzip(BaseTest): datac = gzip.compress(data) self.assertEqual(gzip.decompress(datac), data) - def test_read_truncated(self): - data = data1*50 - # Drop the CRC (4 bytes) and file size (4 bytes). - truncated = gzip.compress(data)[:-8] - with gzip.GzipFile(fileobj=io.BytesIO(truncated)) as f: - self.assertRaises(EOFError, f.read) - with gzip.GzipFile(fileobj=io.BytesIO(truncated)) as f: - self.assertEqual(f.read(len(data)), data) - self.assertRaises(EOFError, f.read, 1) - # Incomplete 10-byte header. - for i in range(2, 10): - with gzip.GzipFile(fileobj=io.BytesIO(truncated[:i])) as f: - self.assertRaises(EOFError, f.read, 1) - def test_read_with_extra(self): # Gzip data with an extra field gzdata = (b'\x1f\x8b\x08\x04\xb2\x17cQ\x02\xff' |