summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 09:05:38 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 09:05:38 (GMT)
commitdf475156f430a5f3fa78f5163bb346ec350ac430 (patch)
tree33f0ec58868af0a80cef95f823f1375a00da38b6 /Lib/test/test_zipfile.py
parentae83d6ee371b5e6aeebe303fb853f5c45638414c (diff)
downloadcpython-df475156f430a5f3fa78f5163bb346ec350ac430.zip
cpython-df475156f430a5f3fa78f5163bb346ec350ac430.tar.gz
cpython-df475156f430a5f3fa78f5163bb346ec350ac430.tar.bz2
Merged revisions 73862,73872 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r73862 | alexandre.vassalotti | 2009-07-05 21:57:00 +0200 (So, 05 Jul 2009) | 2 lines Add the fix for issue 4509 to the mapping methods. ........ r73872 | gregory.p.smith | 2009-07-07 07:06:04 +0200 (Di, 07 Jul 2009) | 2 lines 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)