From: Zachary Ware Date: Mon, 30 Dec 2013 20:54:11 +0000 (-0600) Subject: Issue19619: skip zlib error test when zlib not available X-Git-Tag: v3.4.0b2~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efa2e0403372b409dd96d5410b650eab976c23c0;p=thirdparty%2FPython%2Fcpython.git Issue19619: skip zlib error test when zlib not available --- diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index f6823805feec..f9c9e69f2326 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -2335,7 +2335,7 @@ transform_aliases = { try: import zlib except ImportError: - pass + zlib = None else: bytes_transform_encodings.append("zlib_codec") transform_aliases["zlib_codec"] = ["zip", "zlib"] @@ -2440,6 +2440,7 @@ class TransformCodecTest(unittest.TestCase): bad_input.decode("rot_13") self.assertIsNone(failure.exception.__cause__) + @unittest.skipUnless(zlib, "Requires zlib support") def test_custom_zlib_error_is_wrapped(self): # Check zlib codec gives a good error for malformed input msg = "^decoding with 'zlib_codec' codec failed"