mirror of https://github.com/python/cpython
Issue19619: skip zlib error test when zlib not available
This commit is contained in:
parent
2ee2c95595
commit
efa2e04033
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue