summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #19053: ZipExtFile.read1() with non-zero argument no more returns emptySerhiy Storchaka2013-09-271-0/+39
| | | | bytes until end of data.
* Issue #17944: test_zipfile now discoverable and uses subclassing toSerhiy Storchaka2013-07-221-849/+562
| | | | | generate tests for different compression types. Fixed a bug with skipping some tests due to use of exhausted iterators.
* Refactor recently added bugfix into more testable code by using aGregory P. Smith2013-02-031-12/+29
| | | | | method for windows file name sanitization. Splits the unittest up into several based on platform.
* Fix the test for issue #6972.Serhiy Storchaka2013-02-021-5/+17
|\ | | | | | | Remove trailing dots on Windows.
| * Fix the test for issue #6972.Serhiy Storchaka2013-02-021-5/+17
| | | | | | | | Remove trailing dots on Windows.
* | 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.
| * 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 #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 #12004: Fix an internal error in PyZipFile when writing an invalidSerhiy Storchaka2013-01-291-1/+25
|\ \ | |/ | | | | Python file. Patch by Ben Morgan.
| * Issue #12004: Fix an internal error in PyZipFile when writing an invalidSerhiy Storchaka2013-01-291-1/+24
| | | | | | | | Python file. Patch by Ben Morgan.
* | Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-1/+1
|\ \ | |/ | | | | Patch by Serhiy Storchaka.
| * 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.
* | Issue #9239: add tests for modifying zipfile comments in append mode.Antoine Pitrou2012-06-301-0/+18
|\ \ | |/
| * Issue #9239: add tests for modifying zipfile comments in append mode.Antoine Pitrou2012-06-301-0/+18
| |
| * #14399: zipfile now correctly handles comments added to empty zipfiles.R David Murray2012-04-121-0/+22
| | | | | | | | | | | | | | | | Patch by Serhiy Storchaka. This also moves the TypeError that results from trying to use a unicode comment from the 'close' step to the point at which the comment is added to the zipfile.
* | Issue #14366: Support lzma compression in zip files.Martin v. Löwis2012-05-131-1/+124
| | | | | | | | Patch by Serhiy Storchaka.
* | Check extract_version when opening a zipfile.Martin v. Löwis2012-05-011-0/+10
| |
* | Detect unsupported compression types.Martin v. Löwis2012-05-011-0/+11
| |
* | Issue #14371: Support bzip2 in zipfile module.Martin v. Löwis2012-05-011-1/+125
| | | | | | | | Patch by Serhiy Storchaka.
* | Merge #14399: zipfile now correctly handles comments added to empty zipfiles.R David Murray2012-04-121-0/+22
| | | | | | | | | | | | | | | | Patch by Serhiy Storchaka. This also moves the TypeError that results from trying to use a unicode comment from the 'close' step to the point at which the comment is added to the zipfile.
* | default - Fix closes Issue6090 - Raise a ValueError, instead of failing with ↵Senthil Kumaran2011-10-191-0/+16
|\ \ | |/ | | | | | | | | | | unrelated exceptions, when a document with timestamp earlier than 1980 is provided to zipfile. Patch contributed by Petri Lehtinen.
| * 3.2 - Fix closes Issue6090 - Raise a ValueError, instead of failing with ↵Senthil Kumaran2011-10-191-0/+11
| | | | | | | | | | | | | | unrelated exceptions, when a document with timestamp earlier than 1980 is provided to zipfile. Patch contributed by Petri Lehtinen.
* | Merge #10694: zipfile now ignores garbage at the end of a zipfile.R David Murray2011-06-091-0/+18
|\ \ | |/
| * #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.
| * Skip test that requires zlib when zlib is not available.Ezio Melotti2011-03-141-0/+1
| |
* | Refactor a few tests to use the new requires_zlib decorator.Ezio Melotti2011-05-191-39/+32
| |
* | Skip test if zlib not present. Closes #11498. Patch by Natalia B. Bidart.Eric V. Smith2011-03-141-0/+1
|/
* #10801: do not actually extract, just open() the files in the test zipfile.Georg Brandl2011-01-011-9/+4
|
* #10801: In zipfile, support different encodings for the header and the ↵Georg Brandl2011-01-011-0/+14
| | | | filenames. Patch by MvL, test by Eli Bendersky.
* #4871: check that zipfile password is bytes, and give useful error message.R. David Murray2010-12-211-0/+6
| | | | | | | | | Previously passing a string in as the password would fail either with an assertion error or a TypeError with a confusing error message. Note that a string can't be accepted since zipfile has no way to guess what encoding should be used to turn it into bytes. Patch by Victor Stinner.
* Add an "optimize" parameter to compile() to control the optimization level, ↵Georg Brandl2010-12-041-0/+16
| | | | and provide an interface to it in py_compile, compileall and PyZipFile.
* zipfile: remove remaining ResourceWarningsŁukasz Langa2010-11-231-11/+10
|
* Fix #8886. Use context managers throughout the test.Brian Curtin2010-11-181-105/+107
|
* start banging on zipfile's file leakinessBenjamin Peterson2010-10-311-9/+48
|
* #7351: add more consistent exception name alias.Georg Brandl2010-10-281-11/+11
|
* #1710703: write zipfile structures also in the case of closing a new, but ↵Georg Brandl2010-10-141-0/+25
| | | | empty, archive.
* Issue #9837: The read() method of ZipExtFile objects (as returned byAntoine Pitrou2010-09-121-0/+20
| | | | ZipFile.open()) could return more bytes than requested.
* Issue #7467: when a file from a ZIP archive, its CRC is checked and aAntoine Pitrou2010-08-121-0/+79
| | | | | BadZipfile error is raised if it doesn't match (as used to be the case in Python 2.5 and earlier).
* PEP 3147Barry Warsaw2010-04-171-1/+8
|
* Merged revisions 78097 via svnmerge fromRonald Oussoren2010-02-071-0/+14
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78097 | ronald.oussoren | 2010-02-07 21:18:02 +0100 (Sun, 07 Feb 2010) | 2 lines Issue 6003: ZipFile.writestr "compression_type" argument ........
* Merged revisions 77798 via svnmerge fromAntoine Pitrou2010-01-271-0/+84
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77798 | antoine.pitrou | 2010-01-27 21:59:50 +0100 (mer., 27 janv. 2010) | 8 lines Issue #7610: Reworked implementation of the internal :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. ........
* Merged revisions 77727 via svnmerge fromEzio Melotti2010-01-241-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line use assert[Not]IsInstance where appropriate ........
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-21/+21
| | | | A patch from Dave Malcolm.
* Merged revisions 77178 via svnmerge fromEzio Melotti2009-12-311-102/+97
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77178 | ezio.melotti | 2009-12-31 15:00:43 +0200 (Thu, 31 Dec 2009) | 1 line cleanup and refactoring ........
* Merged revisions 77136 via svnmerge fromEzio Melotti2009-12-301-483/+448
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77136 | ezio.melotti | 2009-12-30 08:14:51 +0200 (Wed, 30 Dec 2009) | 1 line #5511: Added the ability to use ZipFile as a context manager. Patch by Brian Curtin. ........
* Merged revisions 74754 via svnmerge fromEzio Melotti2009-09-121-0/+3
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74754 | ezio.melotti | 2009-09-12 17:43:43 +0300 (Sat, 12 Sep 2009) | 1 line #6026 - fix tests that failed without zlib ........
* Merged revisions 74245 via svnmerge fromAmaury Forgeot d'Arc2009-07-281-0/+10
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74245 | amaury.forgeotdarc | 2009-07-29 00:15:30 +0200 (mer., 29 juil. 2009) | 3 lines #6511: ZipFile will now raise BadZipfile when opening an empty or tiny file, like it does for larger invalid files. ........
* Merged revisions 74011 via svnmerge fromEzio Melotti2009-07-151-127/+127
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74011 | ezio.melotti | 2009-07-15 20:07:04 +0300 (Wed, 15 Jul 2009) | 1 line methods' names pep8ification ........