summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codecs.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-12-30 20:54:11 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-12-30 20:54:11 (GMT)
commitefa2e0403372b409dd96d5410b650eab976c23c0 (patch)
tree3ec68f0d10aad87d9463ae5577d0fefbe1b7cf3c /Lib/test/test_codecs.py
parent2ee2c955954167318173ea3a60c1a03f4a0d21c6 (diff)
downloadcpython-efa2e0403372b409dd96d5410b650eab976c23c0.zip
cpython-efa2e0403372b409dd96d5410b650eab976c23c0.tar.gz
cpython-efa2e0403372b409dd96d5410b650eab976c23c0.tar.bz2
Issue19619: skip zlib error test when zlib not available
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r--Lib/test/test_codecs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index f682380..f9c9e69 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"