diff options
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r-- | Lib/test/test_gzip.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py index 0f8e03e..9989a92 100644 --- a/Lib/test/test_gzip.py +++ b/Lib/test/test_gzip.py @@ -128,6 +128,17 @@ class TestGzip(unittest.TestCase): f.seek(newpos) # positive seek f.close() + def test_seek_whence(self): + self.test_write() + # Try seek(whence=1), read test + + f = gzip.GzipFile(self.filename) + f.read(10) + f.seek(10, whence=1) + y = f.read(10) + f.close() + self.assertEquals(y, data1[20:30]) + def test_seek_write(self): # Try seek, write test f = gzip.GzipFile(self.filename, 'w') |