summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bz2.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-12/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Remove unused imports.Serhiy Storchaka2016-12-161-1/+0
|
* Issue #28664: test_bz2 now works on non-Windows platforms without bunzip2Serhiy Storchaka2016-11-111-33/+26
|\ | | | | | | (e.g. on Android).
| * Issue #28664: test_bz2 now works on non-Windows platforms without bunzip2Serhiy Storchaka2016-11-111-33/+26
| | | | | | | | (e.g. on Android).
* | Issue #28225: bz2 module now supports pathlibBerker Peksag2016-10-021-0/+8
| | | | | | | | Initial patch by Ethan Furman.
* | Issue #28275: Merge bz2 fix from 3.5 into 3.6Martin Panter2016-10-011-0/+6
|\ \ | |/
| * Issue #28275: Clean up to avoid use-after-free after bzip decompress failureMartin Panter2016-10-011-0/+6
| |
* | Use sequence repetition instead of bytes constructor with integer argument.Serhiy Storchaka2016-09-111-2/+2
|/
* Issue #23529: Limit the size of decompressed data when reading fromAntoine Pitrou2015-04-101-9/+21
| | | | | | | | GzipFile, BZ2File or LZMAFile. This defeats denial of service attacks using compressed bombs (i.e. compressed payloads which decompress to a huge size). Patch by Martin Panter and Nikolaus Rath.
* Issue #23799: Added test.support.start_threads() for running and cleaning upSerhiy Storchaka2015-04-011-4/+2
|\ | | | | | | multiple threads.
| * Issue #23799: Added test.support.start_threads() for running and cleaning upSerhiy Storchaka2015-04-011-4/+2
| | | | | | | | multiple threads.
* | Issue #15955: Add an option to limit the output size in bz2.decompress().Antoine Pitrou2015-02-261-0/+103
|/ | | | Patch by Nikolaus Rath.
* Use os.devnull instead of hardcoded '/dev/null'.Serhiy Storchaka2015-02-151-5/+5
|
* Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-4/+6
|
* Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-1/+0
|\ | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang lines in the unittestgui and checkpip scripts.
| * Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-1/+0
| | | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang line to use python3 executable in the unittestgui script.
* | Issue #19886: Use better estimated memory requirements for bigmem tests.Serhiy Storchaka2014-01-101-1/+1
|\ \ | |/ | | | | Incorrect requirements can cause memory swapping.
| * Issue #19886: Use better estimated memory requirements for bigmem tests.Serhiy Storchaka2014-01-101-1/+1
| | | | | | | | Incorrect requirements can cause memory swapping.
* | Closes #19839: Fix regression in bz2 module's handling of non-bzip2 data at EOF.Nadeem Vawda2013-12-041-1/+29
|\ \ | |/ | | | | Also fix an analogous bug (not a regression) in the lzma module.
| * #19839: Fix regression in bz2 module's handling of non-bzip2 data at EOF.Nadeem Vawda2013-12-041-1/+29
| |
* | #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).Nadeem Vawda2013-10-281-0/+10
|\ \ | |/ | | | | | | | | | | The underlying C libraries provide no mechanism for serializing compressor and decompressor objects, so actually pickling these classes is impractical. Previously, these objects would be pickled without error, but attempting to use a deserialized instance would segfault the interpreter.
| * #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).Nadeem Vawda2013-10-281-0/+10
| | | | | | | | | | | | | | The underlying C libraries provide no mechanism for serializing compressor and decompressor objects, so actually pickling these classes is impractical. Previously, these objects would be pickled without error, but attempting to use a deserialized instance would segfault the interpreter.
| * Back out patch for #1159051, which caused backwards compatibility problems.Georg Brandl2013-05-121-14/+0
| |
* | Issue #19223: Add support for the 'x' mode to the bz2 module.Nadeem Vawda2013-10-181-36/+57
| | | | | | | | Patch by Tim Heaney and Vajrasky Kok.
* | Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-0/+13
|\ \ | |/ | | | | | | with truncated header or footer. Added tests for reading truncated gzip, bzip2, and lzma files.
| * Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-0/+14
| |\ | | | | | | | | | | | | with truncated header or footer. Added tests for reading truncated gzip, bzip2, and lzma files.
| | * Issue #1159051: GzipFile now raises EOFError when reading a corrupted fileSerhiy Storchaka2013-01-221-0/+18
| | | | | | | | | | | | | | | with truncated header or footer. Added tests for reading truncated gzip and bzip2 files.
* | | Issue #16828: Fix error incorrectly raised by bz2.compress(b'') and ↵Nadeem Vawda2013-01-021-0/+15
|\ \ \ | |/ / | | | | | | | | | | | | bz2.BZ2Compressor.compress(b''). Initial patch by Martin Packman.
| * | Issue #16828: Fix error incorrectly raised by bz2.compress('').Nadeem Vawda2013-01-021-0/+15
| |\ \ | | |/ | | | | | | Initial patch by Martin Packman.
| | * Issue #16828: Fix error incorrectly raised by bz2.compress('').Nadeem Vawda2013-01-021-0/+15
| | | | | | | | | | | | Patch by Martin Packman.
* | | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-3/+3
| | |
* | | Merge: Add test for BZ2Decompressor.decompress("") after end of stream.Nadeem Vawda2012-10-281-0/+1
|\ \ \ | |/ /
| * | Merge: Add test for BZ2Decompressor.decompress("") after end of stream.Nadeem Vawda2012-10-281-0/+1
| |\ \ | | |/
| | * Add test for BZ2Decompressor.decompress("") after end of stream.Nadeem Vawda2012-10-281-0/+1
| | |
| | * Issue #14398: Fix size truncation and overflow bugs in bz2 module.Nadeem Vawda2012-10-211-1/+39
| | |
* | | Stylistic tweaks to the bz2 module to make it easier to transplant changes fromNadeem Vawda2012-10-081-69/+67
| | | | | | | | | | | | it to http://pypi.python.org/pypi/bz2file.
* | | Closes #16135: Removal of OS/2 supportJesus Cea2012-10-051-1/+1
|/ /
* | Fix GzipFile's handling of filenames given as bytes objects.Nadeem Vawda2012-06-191-0/+15
|\ \ | |/ | | | | Add relevant tests for GzipFile, and also for BZ2File and LZMAFile.
* | Add a function bz2.open(), to match gzip.open().Nadeem Vawda2012-06-041-11/+106
| |
* | Make BZ2File's fileobj support easier to use.Nadeem Vawda2012-06-041-13/+27
| | | | | | | | | | The fileobj argument was added during the 3.3 development cycle, so this change does not break backward compatibility with 3.2.
* | Fix seekable() in BZ2File and LZMAFile to check whether the underlying file ↵Nadeem Vawda2012-02-111-0/+9
| | | | | | | | supports seek().
* | Issue #13809: Make bz2 module work with threads disabled.Nadeem Vawda2012-01-171-0/+7
| | | | | | | | Original patch by Amaury Forgeot d'Arc.
* | Make error handling in BZ2File.{readable,seekable,writable,fileno} ↵Nadeem Vawda2011-11-301-1/+56
| | | | | | | | | | | | consistent with TextIOWrapper. Also, add tests for these methods.
* | Start fixing test_bigmem:Antoine Pitrou2011-10-041-3/+3
|\ \ | |/ | | | | | | - bigmemtest is replaced by precisionbigmemtest - add a poor man's watchdog thread to print memory consumption
* | BZ2File now uses the compresslevel argument given by the caller,Nadeem Vawda2011-09-111-0/+7
| | | | | | | | instead of ignoring it and always using a compression level of 9.
* | Issue #12451: Open the test file in binary mode in test_bz2, the text file isVictor Stinner2011-06-301-1/+1
| | | | | | | | not needed.
* | Simplify line-oriented tests in test_bz2.Nadeem Vawda2011-05-301-14/+7
| |
* | Issue #1625: Add stream ordering test to test_bz2.Nadeem Vawda2011-05-291-0/+11
| |
* | Remove unused data from test_bz2.Nadeem Vawda2011-05-291-13/+6
| | | | | | | | | | DATA_CRLF was used to test BZ2File's universal newline logic, which was removed in changeset ce63a5dcb0af. The tests themselves were removed in fbabdb0d7dd2.
* | Miscellaneous cleanups to bz2 and test_bz2 following issue #1625.Nadeem Vawda2011-05-291-70/+19
| | | | | | | | | | | | | | * In bz2.decompress(), concatenate partial results in a way that should be more friendly to other Python implementations * Remove redundant comments in test_bz2 * Use 'while True:' instead of 'while 1:'