summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tarfile.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #15767: Excise the remaining instances of ModuleNotFoundErrorBrett Cannon2013-07-041-3/+3
|
* Issue #18223: Refactor test_tarfile.Serhiy Storchaka2013-06-171-382/+339
|\ | | | | | | | | | | | | | | | | | | | | | | | | * Use mixins for generating tests for different compression types. * Make test_tarfile discoverable. * Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue. * Add explicit test skips instead of reporting skipped tests as passed. * Wrap long lines. * Correct a comment for test_hardlink_extraction1. * Add support.requires_gzip. * Replace ImportError by ModuleNotFoundError. and some other minor enhancements.
| * Issue #18223: Refactor test_tarfile.Serhiy Storchaka2013-06-171-380/+337
| | | | | | | | | | | | | | | | | | | | | | | | * Use mixins for generating tests for different compression types. * Make test_tarfile discoverable. * Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue. * Add explicit test skips instead of reporting skipped tests as passed. * Wrap long lines. * Correct a comment for test_hardlink_extraction1. * Add support.requires_gzip. and some other minor enhancements.
* | Issue #16601: Restarting iteration over tarfile no more continues from whereSerhiy Storchaka2013-05-091-0/+8
|\ \ | |/ | | | | it left off. Patch by Michael Birtwell.
| * Issue #16601: Restarting iteration over tarfile no more continues from whereSerhiy Storchaka2013-05-091-0/+8
| | | | | | | | it left off. Patch by Michael Birtwell.
* | Issue #16645: Fix hardlink extracting test for tarfile.Serhiy Storchaka2012-12-301-16/+6
|\ \ | |/
| * Issue #16645: Fix hardlink extracting test for tarfile.Serhiy Storchaka2012-12-301-16/+6
| |\
| | * Issue #16645: Fix hardlink extracting test for tarfile.Serhiy Storchaka2012-12-301-16/+6
| | |
* | | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-6/+6
| | |
* | | Get rig of EnvironmentError (#16705)Andrew Svetlov2012-12-171-2/+2
|/ /
* | Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects.Lars Gustäbel2012-05-051-38/+31
| | | | | | | | The ExFileObject class was removed, some of its code went into _FileInFile.
* | Merge with 3.2: Issue #14160: TarFile.extractfile() failed to resolve symbolicLars Gustäbel2012-04-241-0/+3
|\ \ | |/ | | | | links when the links were not located in an archive subdirectory.
| * Issue #14160: TarFile.extractfile() failed to resolve symbolic linksLars Gustäbel2012-04-241-0/+3
| | | | | | | | when the links were not located in an archive subdirectory.
* | Issue #5689: Add support for lzma compression to the tarfile module.Lars Gustäbel2011-12-101-10/+68
| |
* | Remove no longer needed work-around for bz2 file object support.Lars Gustäbel2011-12-061-0/+3
| |
* | Merge with 3.2: Correctly detect bzip2 compressed streams with blocksizes ↵Lars Gustäbel2011-12-061-4/+18
|\ \ | |/ | | | | other than 900k.
| * Correctly detect bzip2 compressed streams with blocksizes other than 900k.Lars Gustäbel2011-12-061-4/+18
| |
* | Merge with 3.2: Issue #13158: Fix decoding and encoding of base-256 number ↵Lars Gustäbel2011-10-141-1/+23
|\ \ | |/ | | | | | | | | | | | | fields in tarfile. The nti() function that converts a number field from a tar header to a number failed to decode GNU tar specific base-256 fields. I also added support for decoding and encoding negative base-256 number fields.
| * Issue #13158: Fix decoding and encoding of base-256 number fields in tarfile.Lars Gustäbel2011-10-141-1/+23
| | | | | | | | | | | | The nti() function that converts a number field from a tar header to a number failed to decode GNU tar specific base-256 fields. I also added support for decoding and encoding negative base-256 number fields.
* | Issue #12326: don't test the major version of sys.platformVictor Stinner2011-08-171-1/+1
| | | | | | | | | | Use startswith, instead of ==, when testing sys.platform to support new platforms like Linux 3 or OpenBSD 5.
* | Merge with 3.2.Georg Brandl2011-08-131-0/+8
|\ \ | |/
| * Fix #11513: wrong exception handling for the case that GzipFile itself ↵Georg Brandl2011-08-131-0/+8
| | | | | | | | raises an IOError.
* | Issue #12451: Add support.create_empty_file()Victor Stinner2011-06-301-3/+3
| | | | | | | | | | | | | | We don't need to create a temporary buffered binary or text file object just to create an empty file. Replace also os.fdopen(handle).close() by os.close(handle).
* | Replace open(filename, 'rU') by open(filename, 'r')Victor Stinner2011-05-041-1/+1
| | | | | | | | The U flag is no more used (but still accepted for backward compatibility).
* | Wrap the correct test with the skip decorator for the issue10761.Senthil Kumaran2011-04-291-1/+2
|\ \ | |/ | | | | merge from 3.2.
| * merge from 3.1Senthil Kumaran2011-04-291-1/+2
| |\
| | * Wrap the testskip decorator for the proper test to resolve bb failure.Senthil Kumaran2011-04-291-1/+1
| | |
* | | merge from 3.2Senthil Kumaran2011-04-281-0/+1
|\ \ \ | |/ /
| * | merge from 3.1Senthil Kumaran2011-04-281-0/+1
| |\ \ | | |/
| | * skip the extractall test on platforms where os.symlink is not available.Senthil Kumaran2011-04-281-0/+1
| | |
* | | merge from 3.2Senthil Kumaran2011-04-281-0/+28
|\ \ \ | |/ /
| * | merge from 3.1Senthil Kumaran2011-04-281-0/+28
| |\ \ | | |/
| | * Add tests for tarfile extractall feature when with symlinksSenthil Kumaran2011-04-281-0/+27
| | |
| | * Merged revisions 81665 via svnmerge fromLars Gustäbel2010-06-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81665 | lars.gustaebel | 2010-06-03 12:11:52 +0200 (Thu, 03 Jun 2010) | 11 lines Merged revisions 81663 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81663 | lars.gustaebel | 2010-06-03 11:56:22 +0200 (Thu, 03 Jun 2010) | 4 lines Issue #8833: tarfile created hard link entries with a size field != 0 by mistake. The associated testcase did not expose this bug because it was broken too. ........ ................
| | * Merged revisions 80618 via svnmerge fromLars Gustäbel2010-04-291-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80618 | lars.gustaebel | 2010-04-29 17:37:02 +0200 (Thu, 29 Apr 2010) | 10 lines Merged revisions 80616 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80616 | lars.gustaebel | 2010-04-29 17:23:38 +0200 (Thu, 29 Apr 2010) | 4 lines Issue #8464: tarfile.open(name, mode="w|") no longer creates files with execute permissions set. ........ ................
| | * Merged revisions 76453 via svnmerge fromLars Gustäbel2009-11-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76453 | lars.gustaebel | 2009-11-23 16:48:33 +0100 (Mon, 23 Nov 2009) | 10 lines Merged revisions 76452 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76452 | lars.gustaebel | 2009-11-23 16:46:19 +0100 (Mon, 23 Nov 2009) | 3 lines Add a testcase that checks if the TarFile constructor successfully closes the internal file object in case of an error (issue #7341). ........ ................
| | * Merged revisions 76219 via svnmerge fromAntoine Pitrou2009-11-111-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76219 | antoine.pitrou | 2009-11-11 21:59:38 +0100 (mer., 11 nov. 2009) | 9 lines Merged revisions 76217 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76217 | antoine.pitrou | 2009-11-11 21:55:07 +0100 (mer., 11 nov. 2009) | 3 lines Issue #7295: Do not use a hardcoded file name in test_tarfile. ........ ................
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
| * | Merged revisions 88528 via svnmerge fromLars Gustäbel2011-02-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88528 | lars.gustaebel | 2011-02-23 12:42:22 +0100 (Wed, 23 Feb 2011) | 16 lines Issue #11224: Improved sparse file read support (r85916) introduced a regression in _FileInFile which is used in file-like objects returned by TarFile.extractfile(). The inefficient design of the _FileInFile.read() method causes various dramatic side-effects and errors: - The data segment of a file member is read completely into memory every(!) time a small block is accessed. This is not only slow but may cause unexpected MemoryErrors with very large files. - Reading members from compressed tar archives is even slower because of the excessive backwards seeking which is done when the same data segment is read over and over again. - As a backwards seek on a TarFile opened in stream mode is not possible, using extractfile() fails with a StreamError. ........
* | | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.
* | | Issue #11224: Improved sparse file read support (r85916) introduced aLars Gustäbel2011-02-231-0/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regression in _FileInFile which is used in file-like objects returned by TarFile.extractfile(). The inefficient design of the _FileInFile.read() method causes various dramatic side-effects and errors: - The data segment of a file member is read completely into memory every(!) time a small block is accessed. This is not only slow but may cause unexpected MemoryErrors with very large files. - Reading members from compressed tar archives is even slower because of the excessive backwards seeking which is done when the same data segment is read over and over again. - As a backwards seek on a TarFile opened in stream mode is not possible, using extractfile() fails with a StreamError.
* | Issue #11014: Make 'filter' argument in tarfile.Tarfile.add() into aRaymond Hettinger2011-01-261-0/+4
| | | | | | | | | | | | | | keyword-only argument. The preceding positional argument was deprecated, so it made no sense to add filter as a positional argument. (Patch reviewed by Brian Curtin and Anthony Long.)
* | Fix #9333. The symlink function is always available now, raising OSErrorBrian Curtin2010-12-281-4/+2
| | | | | | | | when the user doesn't hold the symbolic link privilege rather than hiding it.
* | Fix #9333. Expose os.symlink on Windows only when usable.Brian Curtin2010-12-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege is an account privilege that is required to be held by the user. Not only must the privilege be enabled for the account, the activated privileges for the currently running application must be adjusted to enable the requested privilege. Rather than exposing an additional function to be called prior to the user's first os.symlink call, we handle the AdjustTokenPrivileges Windows API call internally and only expose os.symlink when the privilege escalation was successful. Due to the change of only exposing os.symlink when it's available, we can go back to the original test skipping methods of checking via `hasattr`.
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-1/+1
| |
* | Remove extracted trees at the end of the test.Martin v. Löwis2010-11-011-8/+17
| |
* | Issue #10184: Touch directories only once when extracting a tarfile.Martin v. Löwis2010-11-011-0/+9
| |
* | Issue #10233: Close file objects in a timely manner in the tarfile moduleAntoine Pitrou2010-10-291-27/+48
| | | | | | | | and its test suite.
* | test_tarfile: woops, remove +0.001 which was used to debugVictor Stinner2010-10-291-1/+1
| |
* | test_tarfile: dump mtime as hexadecimal on test_extractall failureVictor Stinner2010-10-291-1/+11
| |