summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile.py
Commit message (Collapse)AuthorAgeFilesLines
* 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 ........
* Merged revisions 73931 via svnmerge fromEzio Melotti2009-07-111-90/+93
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73931 | ezio.melotti | 2009-07-10 23:25:56 +0300 (Fri, 10 Jul 2009) | 1 line more cleanups and if zlib -> skipUnless(zlib) ........
* Merged revisions 73841 via svnmerge fromEzio Melotti2009-07-081-38/+54
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73841 | ezio.melotti | 2009-07-04 17:58:27 +0300 (Sat, 04 Jul 2009) | 1 line if zlib -> skipUnless(zlib) and minor cleanups ........
* Add a unittest for r73566.Gregory P. Smith2009-07-071-0/+8
|
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-38/+38
|
* Merged revisions 72893 via svnmerge fromMartin v. Löwis2009-05-241-0/+5
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72893 | martin.v.loewis | 2009-05-24 21:30:52 +0200 (So, 24 Mai 2009) | 3 lines Issue #6050: Don't fail extracting a directory from a zipfile if the directory already exists. ........
* Merged revisions 68885 via svnmerge fromMartin v. Löwis2009-01-241-1/+25
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68885 | martin.v.loewis | 2009-01-24 15:00:33 +0100 (Sa, 24 Jan 2009) | 3 lines Issue #4710: Extract directories properly in the zipfile module; allow adding directories to a zipfile. ........
* Merged revisions 67946 via svnmerge fromAntoine Pitrou2008-12-271-5/+34
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67946 | antoine.pitrou | 2008-12-27 16:43:12 +0100 (sam., 27 déc. 2008) | 4 lines Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by Gabriel Genellina. ........
* Merged revisions 65235 via svnmerge fromAntoine Pitrou2008-07-251-0/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65235 | antoine.pitrou | 2008-07-25 21:42:26 +0200 (ven., 25 juil. 2008) | 3 lines #3394: zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix ........
* Merged revisions 64688 via svnmerge fromMartin v. Löwis2008-07-031-0/+49
| | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r64688 | martin.v.loewis | 2008-07-03 14:51:14 +0200 (Do, 03 Jul 2008) | 9 lines Patch #1622: Correct interpretation of various ZIP header fields. 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. ........
* Merged revisions ↵Georg Brandl2008-05-251-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63412,63445-63447,63449-63450,63452,63454,63459,63463,63465,63470,63483-63484,63496-63497,63499-63501,63530-63531,63540,63614 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63412 | georg.brandl | 2008-05-17 19:57:01 +0200 (Sat, 17 May 2008) | 2 lines #961805: fix Edit.text_modified(). ........ r63445 | georg.brandl | 2008-05-18 10:52:59 +0200 (Sun, 18 May 2008) | 2 lines GHOP #180 by Michael Schneider: add examples to the socketserver documentation. ........ r63446 | georg.brandl | 2008-05-18 11:12:20 +0200 (Sun, 18 May 2008) | 2 lines GHOP #134, #171, #137: unit tests for the three HTTPServer modules. ........ r63447 | georg.brandl | 2008-05-18 12:39:26 +0200 (Sun, 18 May 2008) | 3 lines Take namedtuple item names only from ascii_letters (this blew up on OSX), and make sure there are no duplicate names. ........ r63449 | georg.brandl | 2008-05-18 13:46:51 +0200 (Sun, 18 May 2008) | 2 lines GHOP #217: add support for compiling Python with coverage checking enabled. ........ r63450 | georg.brandl | 2008-05-18 13:52:36 +0200 (Sun, 18 May 2008) | 2 lines GHOP #257: test distutils' build_ext command, written by Josip Dzolonga. ........ r63452 | georg.brandl | 2008-05-18 15:34:06 +0200 (Sun, 18 May 2008) | 2 lines Add GHOP students. ........ r63454 | georg.brandl | 2008-05-18 18:32:48 +0200 (Sun, 18 May 2008) | 2 lines GHOP #121: improve test_pydoc, by Benjamin Peterson. ........ r63459 | benjamin.peterson | 2008-05-18 22:48:07 +0200 (Sun, 18 May 2008) | 2 lines bring test_pydoc up to my high standards (now that I have them) ........ r63463 | georg.brandl | 2008-05-18 23:10:19 +0200 (Sun, 18 May 2008) | 2 lines Fix test_pyclbr after another platform-dependent function was added to urllib. ........ r63465 | benjamin.peterson | 2008-05-19 01:07:07 +0200 (Mon, 19 May 2008) | 2 lines change some imports in tests so they will not be skipped in 3.0 ........ r63470 | georg.brandl | 2008-05-19 18:47:25 +0200 (Mon, 19 May 2008) | 2 lines test_httpservers has unpredictable refcount behavior. ........ r63483 | georg.brandl | 2008-05-20 08:15:36 +0200 (Tue, 20 May 2008) | 2 lines Activate two more test cases in test_httpservers. ........ r63484 | georg.brandl | 2008-05-20 08:47:31 +0200 (Tue, 20 May 2008) | 2 lines Argh, this is the *actual* test that works under Windows. ........ r63496 | georg.brandl | 2008-05-20 10:07:36 +0200 (Tue, 20 May 2008) | 2 lines Improve diffing logic and output for test_pydoc. ........ r63497 | georg.brandl | 2008-05-20 10:10:03 +0200 (Tue, 20 May 2008) | 2 lines Use inspect.getabsfile() to get the documented module's filename. ........ r63499 | georg.brandl | 2008-05-20 10:25:48 +0200 (Tue, 20 May 2008) | 3 lines Patch #1775025: allow opening zipfile members via ZipInfo instances. Patch by Graham Horler. ........ r63500 | georg.brandl | 2008-05-20 10:40:43 +0200 (Tue, 20 May 2008) | 2 lines #2592: delegate nb_index and the floor/truediv slots in weakref.proxy. ........ r63501 | georg.brandl | 2008-05-20 10:48:34 +0200 (Tue, 20 May 2008) | 2 lines #615772: raise a more explicit error from Tkinter.Misc.__contains__. ........ r63530 | benjamin.peterson | 2008-05-22 02:57:02 +0200 (Thu, 22 May 2008) | 2 lines use more specific asserts in test_opcode ........ r63531 | benjamin.peterson | 2008-05-22 03:02:23 +0200 (Thu, 22 May 2008) | 2 lines remove redundant invocation of json doctests ........ r63540 | benjamin.peterson | 2008-05-23 01:09:26 +0200 (Fri, 23 May 2008) | 3 lines fix test_pydoc so it works on make installed Python installations Also let it pass when invoked directly ........ r63614 | georg.brandl | 2008-05-25 10:07:37 +0200 (Sun, 25 May 2008) | 2 lines #2959: allow multiple close() calls for GzipFile. ........
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-2/+2
|