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.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 694ef6e..cb06108 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -132,10 +132,8 @@ class ExceptionTestCase(unittest.TestCase):
@support.cpython_only
def test_disallow_instantiation(self):
# Ensure that the type disallows instantiation (bpo-43916)
- comp_type = type(zlib.compressobj())
- decomp_type = type(zlib.decompressobj())
- self.assertRaises(TypeError, comp_type)
- self.assertRaises(TypeError, decomp_type)
+ support.check_disallow_instantiation(self, type(zlib.compressobj()))
+ support.check_disallow_instantiation(self, type(zlib.decompressobj()))
class BaseCompressTestCase(object):