diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-19 18:25:10 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-19 18:25:10 (GMT) |
commit | cad648cbc95db0a5d694bd73a6a4ba2505920066 (patch) | |
tree | b1894b64804ca923eb52c92a65517130e87e1aa0 /Lib/test/support.py | |
parent | ebbb14c1a1ec226b06f96d1fc581122558e1385e (diff) | |
download | cpython-cad648cbc95db0a5d694bd73a6a4ba2505920066.zip cpython-cad648cbc95db0a5d694bd73a6a4ba2505920066.tar.gz cpython-cad648cbc95db0a5d694bd73a6a4ba2505920066.tar.bz2 |
Skip tests that require zlib in the packaging tests. Also add a requires_zlib decorator to test.support.
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 |