diff options
Diffstat (limited to 'Lib/test/support.py')
-rw-r--r-- | Lib/test/support.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index e49453e..3f60d55 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -28,6 +28,11 @@ try: except ImportError: _thread = None +try: + import zlib +except ImportError: + zlib = None + __all__ = [ "Error", "TestFailed", "ResourceDenied", "import_module", "verbose", "use_resources", "max_memuse", "record_original_stdout", @@ -43,7 +48,7 @@ __all__ = [ "threading_cleanup", "reap_children", "cpython_only", "check_impl_detail", "get_attribute", "swap_item", "swap_attr", "requires_IEEE_754", "TestHandler", "Matcher", "can_symlink", "skip_unless_symlink", - "import_fresh_module" + "import_fresh_module", "requires_zlib" ] class Error(Exception): @@ -401,6 +406,8 @@ requires_IEEE_754 = unittest.skipUnless( float.__getformat__("double").startswith("IEEE"), "test requires IEEE 754 doubles") +requires_zlib = unittest.skipUnless(zlib, 'requires zlib') + is_jython = sys.platform.startswith('java') # Filename used for testing |