mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Issue #14371: Support bzip2 in zipfile module.
Patch by Serhiy Storchaka.
This commit is contained in:
parent
9acbb6074f
commit
f6b16a4b50
5 changed files with 334 additions and 98 deletions
|
|
@ -40,6 +40,11 @@ try:
|
|||
except ImportError:
|
||||
zlib = None
|
||||
|
||||
try:
|
||||
import bz2
|
||||
except ImportError:
|
||||
bz2 = None
|
||||
|
||||
__all__ = [
|
||||
"Error", "TestFailed", "ResourceDenied", "import_module",
|
||||
"verbose", "use_resources", "max_memuse", "record_original_stdout",
|
||||
|
|
@ -57,7 +62,7 @@ __all__ = [
|
|||
"get_attribute", "swap_item", "swap_attr", "requires_IEEE_754",
|
||||
"TestHandler", "Matcher", "can_symlink", "skip_unless_symlink",
|
||||
"import_fresh_module", "requires_zlib", "PIPE_MAX_SIZE", "failfast",
|
||||
"anticipate_failure", "run_with_tz"
|
||||
"anticipate_failure", "run_with_tz", "requires_bz2"
|
||||
]
|
||||
|
||||
class Error(Exception):
|
||||
|
|
@ -506,6 +511,8 @@ requires_IEEE_754 = unittest.skipUnless(
|
|||
|
||||
requires_zlib = unittest.skipUnless(zlib, 'requires zlib')
|
||||
|
||||
requires_bz2 = unittest.skipUnless(bz2, 'requires bz2')
|
||||
|
||||
is_jython = sys.platform.startswith('java')
|
||||
|
||||
# Filename used for testing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue