summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2009-07-07 05:06:04 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2009-07-07 05:06:04 (GMT)
commitb0d9ca92586a955f497682eb3e689b47d16cbb68 (patch)
tree35def79ce30619b4c55f739e04f5783c15f73a4e /Lib/test/test_zipfile.py
parent097cd072c052382d9a85375340b90ab59ce243f7 (diff)
downloadcpython-b0d9ca92586a955f497682eb3e689b47d16cbb68.zip
cpython-b0d9ca92586a955f497682eb3e689b47d16cbb68.tar.gz
cpython-b0d9ca92586a955f497682eb3e689b47d16cbb68.tar.bz2
Add a unittest for r73566.
Diffstat (limited to 'Lib/test/test_zipfile.py')
-rw-r--r--Lib/test/test_zipfile.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 82602c1..ed800c5 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -379,6 +379,14 @@ class TestsWithSourceFile(unittest.TestCase):
for f in (TESTFN2, TemporaryFile(), io.BytesIO()):
self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED)
+ def test_writestr_extended_local_header_issue1202(self):
+ orig_zip = zipfile.ZipFile(TESTFN2, 'w')
+ for data in 'abcdefghijklmnop':
+ zinfo = zipfile.ZipInfo(data)
+ zinfo.flag_bits |= 0x08 # Include an extended local header.
+ orig_zip.writestr(zinfo, data)
+ orig_zip.close()
+
def tearDown(self):
os.remove(TESTFN)
os.remove(TESTFN2)