changeset: 88226:0e10367c88ce user: Zachary Ware date: Mon Dec 30 14:54:11 2013 -0600 files: Lib/test/test_codecs.py description: Issue19619: skip zlib error test when zlib not available diff -r 83f12a9593db -r 0e10367c88ce Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Mon Dec 30 14:39:46 2013 -0600 +++ b/Lib/test/test_codecs.py Mon Dec 30 14:54:11 2013 -0600 @@ -2335,7 +2335,7 @@ 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 @@ 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"