From: Gregory P. Smith Date: Tue, 7 Jul 2009 05:06:04 +0000 (+0000) Subject: Add a unittest for r73566. X-Git-Tag: v3.2a1~2871 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0d9ca92586a955f497682eb3e689b47d16cbb68;p=thirdparty%2FPython%2Fcpython.git Add a unittest for r73566. --- diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index 82602c1bbbf2..ed800c577dd1 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)