summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r--Lib/test/test_zlib.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index ae54f6c..3dac70e 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -944,13 +944,18 @@ LAERTES
"""
-class ZlibDecompressorTest():
+class ZlibDecompressorTest(unittest.TestCase):
# Test adopted from test_bz2.py
TEXT = HAMLET_SCENE
DATA = zlib.compress(HAMLET_SCENE)
BAD_DATA = b"Not a valid deflate block"
+ BIG_TEXT = DATA * ((128 * 1024 // len(DATA)) + 1)
+ BIG_DATA = zlib.compress(BIG_TEXT)
+
def test_Constructor(self):
- self.assertRaises(TypeError, zlib._ZlibDecompressor, 42)
+ self.assertRaises(TypeError, zlib._ZlibDecompressor, "ASDA")
+ self.assertRaises(TypeError, zlib._ZlibDecompressor, -15, "notbytes")
+ self.assertRaises(TypeError, zlib._ZlibDecompressor, -15, b"bytes", 5)
def testDecompress(self):
zlibd = zlib._ZlibDecompressor()