diff options
| author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-05-27 06:43:52 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-27 06:43:52 (GMT) |
| commit | fbff5387c3e1f3904420fa5a27738c6c5881305b (patch) | |
| tree | a4e01083dde3afdde7306e55f70c1493fdc07b0a /Lib/test/test_zlib.py | |
| parent | 3e7ee02327db13e4337374597cdc4458ecb9e3ad (diff) | |
| download | cpython-fbff5387c3e1f3904420fa5a27738c6c5881305b.zip cpython-fbff5387c3e1f3904420fa5a27738c6c5881305b.tar.gz cpython-fbff5387c3e1f3904420fa5a27738c6c5881305b.tar.bz2 | |
bpo-43988: Use check disallow instantiation helper (GH-26392)
Diffstat (limited to 'Lib/test/test_zlib.py')
| -rw-r--r-- | Lib/test/test_zlib.py | 6 |
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): |
