summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bz2.py
Commit message (Collapse)AuthorAgeFilesLines
* 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:'
* | Issue #1625: BZ2File and bz2.decompress() now support multi-stream files.Nadeem Vawda2011-05-261-2/+124
| | | | | | | | Initial patch by Nir Aides.
* | Fix 64-bit safety issue in BZ2Compressor and BZ2Decompressor.Nadeem Vawda2011-04-121-1/+35
| |
* | Issue #5863: Rewrite BZ2File in pure Python, and allow it to acceptAntoine Pitrou2011-04-031-20/+122
|/ | | | | file-like objects using a new `fileobj` constructor argument. Patch by Nadeem Vawda.
* Issue #11018: fix a test to not be a no-op in test_bz2.Antoine Pitrou2011-01-261-1/+1
| | | | Found by Nadeem Vawda, reviewed by Brett.
* Implement #7944. Use `with` throughout the test suite.Brian Curtin2010-10-131-126/+93
|
* Issue #8397: Raise an error when attempting to mix iteration and regularAntoine Pitrou2010-08-011-0/+18
| | | | reads on a BZ2File object, rather than returning incorrect results.
* Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge fromVictor Stinner2010-04-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines Issue #7449, part 1: fix test_support.py for Python compiled without thread ........ r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line Issue #7449, part 2: regrtest.py -j option requires thread support ........ r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines Issue #7449 part 3, test_doctest: import trace module in test_coverage() Import trace module fail if the threading module is missing. test_coverage() is only used if test_doctest.py is used with the -c option. This commit allows to execute the test suite without thread support. Move "import trace" in test_coverage() and use test_support.import_module('trace'). ........ r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines Issue #7449, part 4: skip test_multiprocessing if thread support is disabled import threading after _multiprocessing to raise a more revelant error message: "No module named _multiprocessing". _multiprocessing is not compiled without thread support. ........ r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py * Split Test.test_open() in 2 functions: test_open() and test_thread_open() * Skip test_open() and test_thread_open() if we are unable to find the C library * Skip test_thread_open() if thread support is disabled * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError() ........ r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines Issue #7449, part 6: fix test_hashlib for missing threading module Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing(). ........ r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, part 7: simplify threading detection in test_capi * Skip TestPendingCalls if threading module is missing * Test if threading module is present or not, instead of test the presence of _testcapi._test_thread_state ........ r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing TestFifo can be executed without the threading module ........ r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, part 9: fix test_xmlrpclib for missing threading module * Skip testcases using threads if threading module is missing * Use "http://" instead of URL in ServerProxyTestCase if threading is missing because URL is not set in this case ........ r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines Partial revert of r80556 (Issue #7449, part 5, fix ctypes test) Rewrite r80556: the thread test have to be executed just after the test on libc_open() and so the test cannot be splitted in two functions (without duplicating code, and I don't want to duplicate code). ........ r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines Issue #7449, part 10: test_cmd imports trace module using test_support.import_module() Use test_support.import_module() instead of import to raise a SkipTest exception if the import fail. Import trace fails if the threading module is missing. See also part 3: test_doctest: import trace module in test_coverage(). ........ r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, last part (11): fix many tests if thread support is disabled * Use try/except ImportError or test_support.import_module() to import thread and threading modules * Add @unittest.skipUnless(threading, ...) to testcases using threads ........
* convert shebang lines: python -> python3Benjamin Peterson2010-03-111-1/+1
|
* Merged revisions 75818 via svnmerge fromAntoine Pitrou2009-10-271-0/+18
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75818 | antoine.pitrou | 2009-10-27 18:41:58 +0100 (mar., 27 oct. 2009) | 3 lines Issue #7205: Fix a possible deadlock when using a BZ2File object from several threads at once. ........
* Merged revisions 70734,70775,70856,70874,70876-70877 via svnmergeR. David Murray2009-03-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ........ r70734 | r.david.murray | 2009-03-30 15:04:00 -0400 (Mon, 30 Mar 2009) | 7 lines Add import_function method to test.test_support, and modify a number of tests that expect to be skipped if imports fail or functions don't exist to use import_function and import_module. The ultimate goal is to change regrtest to not skip automatically on ImportError. Checking in now to make sure the buldbots don't show any errors on platforms I can't direct test on. ........ r70775 | r.david.murray | 2009-03-30 19:05:48 -0400 (Mon, 30 Mar 2009) | 4 lines Change more tests to use import_module for the modules that should cause tests to be skipped. Also rename import_function to the more descriptive get_attribute and add a docstring. ........ r70856 | r.david.murray | 2009-03-31 14:32:17 -0400 (Tue, 31 Mar 2009) | 7 lines A few more test skips via import_module, and change import_module to return the error message produced by importlib, so that if an import in the package whose import is being wrapped is what failed the skip message will contain the name of that module instead of the name of the wrapped module. Also fixed formatting of some previous comments. ........ r70874 | r.david.murray | 2009-03-31 15:33:15 -0400 (Tue, 31 Mar 2009) | 5 lines Improve test_support.import_module docstring, remove deprecated flag from get_attribute since it isn't likely to do anything useful. ........ r70876 | r.david.murray | 2009-03-31 15:49:15 -0400 (Tue, 31 Mar 2009) | 4 lines Remove the regrtest check that turns any ImportError into a skipped test. Hopefully all modules whose imports legitimately result in a skipped test have been properly wrapped by the previous commits. ........ r70877 | r.david.murray | 2009-03-31 15:57:24 -0400 (Tue, 31 Mar 2009) | 2 lines Add NEWS entry for regrtest change. ........
* Merged revisions 68484-68485 via svnmerge fromAntoine Pitrou2009-01-101-0/+22
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68484 | antoine.pitrou | 2009-01-10 17:13:45 +0100 (sam., 10 janv. 2009) | 3 lines Issue #3860: GzipFile and BZ2File now support the context manager protocol. ........ r68485 | antoine.pitrou | 2009-01-10 17:15:24 +0100 (sam., 10 janv. 2009) | 1 line Add NEWS entry for r68484. ........
* Merged revisions ↵Georg Brandl2008-07-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64623,64640,64665,64687,64689-64690,64719,64721,64735,64742,64744-64746,64756-64761,64767-64769,64771-64772,64774-64775,64788,64793,64835-64836 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64623 | benjamin.peterson | 2008-07-01 21:51:54 +0200 (Tue, 01 Jul 2008) | 1 line write a short little section for multiprocessing; it still needs help ........ r64640 | georg.brandl | 2008-07-01 22:56:03 +0200 (Tue, 01 Jul 2008) | 2 lines Add a comment about incref'ing w. ........ r64665 | jesse.noller | 2008-07-02 18:56:51 +0200 (Wed, 02 Jul 2008) | 1 line Add #!/usr/bin/env python for ben ........ r64687 | andrew.kuchling | 2008-07-03 14:50:03 +0200 (Thu, 03 Jul 2008) | 1 line Tweak wording ........ r64689 | benjamin.peterson | 2008-07-03 14:57:35 +0200 (Thu, 03 Jul 2008) | 1 line lowercase glossary term ........ r64690 | benjamin.peterson | 2008-07-03 15:01:17 +0200 (Thu, 03 Jul 2008) | 1 line let the term be linked ........ r64719 | raymond.hettinger | 2008-07-05 04:11:55 +0200 (Sat, 05 Jul 2008) | 1 line Update comment on prediction macros. ........ r64721 | georg.brandl | 2008-07-05 12:07:18 +0200 (Sat, 05 Jul 2008) | 2 lines Fix tabs. ........ r64735 | mark.dickinson | 2008-07-05 17:25:48 +0200 (Sat, 05 Jul 2008) | 3 lines Minor rewrite of cmath_log to work around a Sun compiler bug. See issue #3168. ........ r64742 | benjamin.peterson | 2008-07-05 18:29:38 +0200 (Sat, 05 Jul 2008) | 1 line make regrtest aware of the lib2to3 resource ........ r64744 | georg.brandl | 2008-07-05 18:43:45 +0200 (Sat, 05 Jul 2008) | 2 lines Keep below 80 chars. ........ r64745 | facundo.batista | 2008-07-05 21:19:50 +0200 (Sat, 05 Jul 2008) | 3 lines Issue 3289. Removed two lines that ended doing nothing. ........ r64746 | facundo.batista | 2008-07-05 22:39:59 +0200 (Sat, 05 Jul 2008) | 4 lines Issue #3239. Differentiate the ascii call from the curses one and the builtin one. ........ r64756 | gregory.p.smith | 2008-07-06 09:16:40 +0200 (Sun, 06 Jul 2008) | 3 lines - Issue #2113: Fix error in subprocess.Popen if the select system call is interrupted by a signal. ........ r64757 | benjamin.peterson | 2008-07-06 14:39:09 +0200 (Sun, 06 Jul 2008) | 1 line remove test_compact_freelists from test_sys ........ r64758 | gregory.p.smith | 2008-07-06 19:06:29 +0200 (Sun, 06 Jul 2008) | 2 lines fix issue3304 - remove an incorrect PyMem_Free in fileio_init ........ r64759 | georg.brandl | 2008-07-06 19:36:20 +0200 (Sun, 06 Jul 2008) | 2 lines Fix opensearch template. ........ r64760 | andrew.kuchling | 2008-07-06 19:43:16 +0200 (Sun, 06 Jul 2008) | 1 line Wording fix ........ r64761 | andrew.kuchling | 2008-07-06 19:44:17 +0200 (Sun, 06 Jul 2008) | 1 line Add two items; rewrap paragraph ........ r64767 | gregory.p.smith | 2008-07-07 06:31:58 +0200 (Mon, 07 Jul 2008) | 4 lines - Issue #3309: Fix bz2.BZFile itererator to release its internal lock properly when raising an exception due to the bz2file being closed. Prevents a deadlock. ........ r64768 | josiah.carlson | 2008-07-07 06:51:46 +0200 (Mon, 07 Jul 2008) | 2 lines Fixed bugs 760475, 953599, and 1519. ........ r64769 | gregory.p.smith | 2008-07-07 06:54:31 +0200 (Mon, 07 Jul 2008) | 2 lines Add commented out #_sha256 and #_sha512 lines per issue 3183. ........ r64771 | gregory.p.smith | 2008-07-07 07:09:12 +0200 (Mon, 07 Jul 2008) | 4 lines - Issue #3094: httplib.HTTPSConnection Host: headers no longer include the redundant ":443" port number designation when the connection is using the default https port (443). ........ r64772 | skip.montanaro | 2008-07-07 13:16:14 +0200 (Mon, 07 Jul 2008) | 2 lines Correct grammar. ........ r64774 | andrew.kuchling | 2008-07-07 18:51:09 +0200 (Mon, 07 Jul 2008) | 1 line Fix example to match text ........ r64775 | facundo.batista | 2008-07-07 19:02:59 +0200 (Mon, 07 Jul 2008) | 3 lines Issue 3306. Better control for a lenght in findmax() function. ........ r64788 | georg.brandl | 2008-07-08 09:05:23 +0200 (Tue, 08 Jul 2008) | 2 lines Add missing ABCs to list. ........ r64793 | nick.coghlan | 2008-07-08 16:21:42 +0200 (Tue, 08 Jul 2008) | 1 line Add missing NEWS and ACK entries for r64791 ........ r64835 | raymond.hettinger | 2008-07-10 11:31:08 +0200 (Thu, 10 Jul 2008) | 1 line Issue 3287: Raise correct exception for float inputs. ........ r64836 | raymond.hettinger | 2008-07-10 12:28:41 +0200 (Thu, 10 Jul 2008) | 1 line Use operator.index() instead of n.__index__(). ........
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-4/+4
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-4/+4
| | | | | | | | | | | | | | No detailed change log; just check out the change log for the py3k-pep3137 branch. The most obvious changes: - str8 renamed to bytes (PyString at the C level); - bytes renamed to buffer (PyBytes at the C level); - PyString and PyUnicode are no longer compatible. I.e. we now have an immutable bytes type and a mutable bytes type. The behavior of PyString was modified quite a bit, to make it more bytes-like. Some changes are still on the to-do list.