summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gzip.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-03-09 21:47:58 (GMT)
committerNed Deily <nad@acm.org>2014-03-09 21:47:58 (GMT)
commite5127299c86666080c50e8b7c76e70c3b968ada2 (patch)
tree86e9e67d731785042b48f4bff6e3feabf2a12e67 /Lib/test/test_gzip.py
parentb8bf9951ad294398a7fb95d2fbbf79182c6a0920 (diff)
parent6120739f0cb1c26069570fea701fe79489f1cd9d (diff)
downloadcpython-e5127299c86666080c50e8b7c76e70c3b968ada2.zip
cpython-e5127299c86666080c50e8b7c76e70c3b968ada2.tar.gz
cpython-e5127299c86666080c50e8b7c76e70c3b968ada2.tar.bz2
Issue #20875: Merge from 3.3
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r--Lib/test/test_gzip.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index 5289407..b7a7e03 100644
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -421,6 +421,13 @@ class TestGzip(BaseTest):
with gzip.GzipFile(fileobj=io.BytesIO(gzdata)) as f:
self.assertEqual(f.read(), b'Test')
+ def test_prepend_error(self):
+ # See issue #20875
+ with gzip.open(self.filename, "wb") as f:
+ f.write(data1)
+ with gzip.open(self.filename, "rb") as f:
+ f.fileobj.prepend()
+
class TestOpen(BaseTest):
def test_binary_modes(self):
uncompressed = data1 * 50