summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile.py
Commit message (Collapse)AuthorAgeFilesLines
* adjust zipfile tests for splitdrive improvementsBenjamin Peterson2014-06-231-4/+4
|
* Fix issue #14315: The zipfile module now ignores extra fields in the centralGregory P. Smith2014-05-301-0/+15
| | | | | | directory that are too short to be parsed instead of letting a struct.unpack error bubble up as this "bad data" appears in many real world zip files in the wild and is ignored by other zip tools.
* properly close files in test_zipfile (#20887)Benjamin Peterson2014-04-031-28/+46
| | | | Patch by Matti Picus.
* Issue #20262: Warnings are raised now when duplicate names are added in theSerhiy Storchaka2014-01-201-3/+6
| | | | ZIP file or too long ZIP file comment is truncated.
* Issue #17656: Skip test_extract_unicode_filenames if the FS encodingSerhiy Storchaka2013-05-081-1/+9
| | | | doesn't support non-ASCII filenames.
* Issue #17656: Fix extraction of zip files with unicode member paths.Serhiy Storchaka2013-04-131-1/+20
|
* Fix test for issue #6972.Serhiy Storchaka2013-02-021-0/+1
|
* Preserve backslashes in malicious zip files for testing issue #6972.Serhiy Storchaka2013-02-021-1/+6
|
* Fix the test and remove trailing dots on Windows for issue #6972.Serhiy Storchaka2013-02-021-8/+14
|
* Fixes Issue #6972: The zipfile module no longer overwrites files outside ofGregory P. Smith2013-02-011-9/+77
| | | | its destination path when extracting malicious zip files.
* Issue #4844: ZipFile now raises BadZipfile when opens a ZIP file with anSerhiy Storchaka2013-01-311-0/+14
| | | | | incomplete "End of Central Directory" record. Original patch by Guilherme Polo and Alan McIntyre.
* Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-1/+1
| | | | Patch by Serhiy Storchaka.
* #14313: zipfile now raises NotImplementedError when the compression type is ↵Ezio Melotti2012-11-181-0/+11
| | | | unknown.
* #14399: zipfile now correctly handles comments added to empty zipfiles.R David Murray2012-04-121-0/+16
| | | | Patch by Serhiy Storchaka.
* Fix closes Issue6090 - Raise a ValueError, instead of failing with unrelatedSenthil Kumaran2011-10-191-0/+10
| | | | | exceptions, when a document with timestamp earlier than 1980 is provided to zipfile. Patch contributed by Petri Lehtinen.
* #10694: zipfile now ignores garbage at the end of a zipfile.R David Murray2011-06-091-0/+18
| | | | Original fix by 'rep', final patch (with tests) by Xuanji Li.
* Fix #8886. Use context managers throughout zipfile tests.Brian Curtin2011-04-201-112/+110
| | | | This was fixed in py3k SVN. Consider this a backport.
* Fix typo: BadZipFile exists in 3.2+ only, not older versions.Éric Araujo2011-02-021-1/+1
|
* Merged revisions 85455 via svnmerge fromGeorg Brandl2010-11-261-0/+25
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85455 | georg.brandl | 2010-10-14 08:59:45 +0200 (Do, 14 Okt 2010) | 1 line #1710703: write zipfile structures also in the case of closing a new, but empty, archive. ........
* Merged revisions 84737 via svnmerge fromAntoine Pitrou2010-09-121-0/+20
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84737 | antoine.pitrou | 2010-09-12 16:51:20 +0200 (dim., 12 sept. 2010) | 4 lines Issue #9837: The read() method of ZipExtFile objects (as returned by ZipFile.open()) could return more bytes than requested. ........
* Merged revisions 83959-83960 via svnmerge fromAntoine Pitrou2010-08-121-0/+80
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83959 | antoine.pitrou | 2010-08-12 17:11:50 +0200 (jeu., 12 août 2010) | 5 lines Issue #7467: when a file from a ZIP archive, its CRC is checked and a BadZipfile error is raised if it doesn't match (as used to be the case in Python 2.5 and earlier). ........ r83960 | antoine.pitrou | 2010-08-12 17:15:01 +0200 (jeu., 12 août 2010) | 3 lines Typo. ........
* Issue 6003: ZipFile.writestr "compression_type" argumentRonald Oussoren2010-02-071-0/+14
|
* Issue #7610: Reworked implementation of the internalAntoine Pitrou2010-01-271-0/+84
| | | | | | | | :class:`zipfile.ZipExtFile` class used to represent files stored inside an archive. The new implementation is significantly faster and can be wrapped in a :class:`io.BufferedReader` object for more speedups. It also solves an issue where interleaved calls to `read()` and `readline()` give wrong results. Patch by Nir Aides.
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-1/+1
|
* use assert[Not]In where appropriateEzio Melotti2010-01-231-21/+21
|
* indentation and further alignment with py3kEzio Melotti2009-12-311-3/+3
|
* cleanup and refactoringEzio Melotti2009-12-311-128/+123
|
* #5511: Added the ability to use ZipFile as a context manager. Patch by Brian ↵Ezio Melotti2009-12-301-489/+452
| | | | Curtin.
* #6026 - fix tests that failed without zlibEzio Melotti2009-09-121-0/+3
|
* #6511: ZipFile will now raise BadZipfile when opening an empty or tiny file,Amaury Forgeot d'Arc2009-07-281-0/+10
| | | | like it does for larger invalid files.
* methods' names pep8ificationEzio Melotti2009-07-151-127/+127
|
* more cleanups and if zlib -> skipUnless(zlib)Ezio Melotti2009-07-101-90/+94
|
* if zlib -> skipUnless(zlib) and minor cleanupsEzio Melotti2009-07-041-37/+49
|
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-38/+38
|
* Issue #6050: Don't fail extracting a directory from a zipfile ifMartin v. Löwis2009-05-241-0/+5
| | | | the directory already exists.
* Issue #4710: Extract directories properly in the zipfile module;Martin v. Löwis2009-01-241-1/+25
| | | | allow adding directories to a zipfile.
* Issue #4756: zipfile.is_zipfile() now supports file-like objects.Antoine Pitrou2008-12-271-5/+34
| | | | Patch by Gabriel Genellina.
* #3394: zipfile.writestr doesn't set external attributes, so files are ↵Antoine Pitrou2008-07-251-0/+13
| | | | extracted mode 000 on Unix
* Patch #1622: Correct interpretation of various ZIP header fields.Martin v. Löwis2008-07-031-0/+48
| | | | | | | | | Also fixes - Issue #1526: Allow more than 64k files to be added to Zip64 file. - Issue #1746: Correct handling of zipfile archive comments (previously archives with comments over 4k were flagged as invalid). Allow writing Zip files with archives by setting the 'comment' attribute of a ZipFile.
* Patch #1775025: allow opening zipfile members via ZipInfo instances.Georg Brandl2008-05-201-0/+19
| | | | Patch by Graham Horler.
* Fix Unicode filename test.Martin v. Löwis2008-05-051-4/+6
|
* Issue #1734346: Support Unicode file names for zipfiles.Martin v. Löwis2008-05-051-0/+9
|
* Unit test fix from Giampaolo Rodola, #1938Christian Heimes2008-01-261-0/+1
|
* Fix zipfile decryption. The check for validity only worked on oneGregory P. Smith2008-01-201-0/+21
| | | | | | | | type of encrypted zip files. Files using extended local headers needed to compare the check byte against different values. (according to reading the infozip unzip crypt.c source code) Fixes issue1003.
* #467924, patch by Alan McIntyre: Add ZipFile.extract and ZipFile.extractall.Georg Brandl2008-01-071-0/+56
|
* Patch #1675424: Added tests for uncovered code in the zipfile module.Georg Brandl2007-07-121-4/+114
| | | | | The KeyError raised by Zipfile.getinfo for nonexistent names now has a descriptive message.
* Remove direct call's to file's constructor and replace them with calls toBrett Cannon2007-05-251-1/+1
| | | | open() as ths is considered best practice.
* Whitespace normalization. Ugh, we really need to do this more often.Neal Norwitz2007-04-251-2/+2
| | | | You might want to review this change as it's my first time. Be gentle. :-)
* Make test_zipfile clean up its temporary files properly.Collin Winter2007-03-291-7/+12
|
* Whitespace normalization.Tim Peters2007-03-121-49/+49
|