summaryrefslogtreecommitdiff
path: root/Lib/test/test_zipfile.py
diff options
context:
space:
mode:
authorMickaƫl Schoentgen <contact@tiger-222.fr>2018-07-29 20:26:52 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2018-07-29 21:26:52 +0300
commit3f8c6913b82ed9c05e57175bcbfeacde46c598e3 (patch)
tree5a548963a242aa533ccd529028928724c6dcb093 /Lib/test/test_zipfile.py
parentd2e902e4fb304f27e4a72356efbc1fc26be3935d (diff)
downloadcpython-git-3f8c6913b82ed9c05e57175bcbfeacde46c598e3.tar.gz
bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527)
Diffstat (limited to 'Lib/test/test_zipfile.py')
-rw-r--r--Lib/test/test_zipfile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 61c3e349a6..ac9a4ff6fe 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -1646,6 +1646,8 @@ class OtherTests(unittest.TestCase):
self.assertEqual(fp.read(5), txt[bloc:bloc+5])
fp.seek(0, os.SEEK_END)
self.assertEqual(fp.tell(), len(txt))
+ fp.seek(0, os.SEEK_SET)
+ self.assertEqual(fp.tell(), 0)
# Check seek on memory file
data = io.BytesIO()
with zipfile.ZipFile(data, mode="w") as zipf:
@@ -1661,6 +1663,8 @@ class OtherTests(unittest.TestCase):
self.assertEqual(fp.read(5), txt[bloc:bloc+5])
fp.seek(0, os.SEEK_END)
self.assertEqual(fp.tell(), len(txt))
+ fp.seek(0, os.SEEK_SET)
+ self.assertEqual(fp.tell(), 0)
def tearDown(self):
unlink(TESTFN)