mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-43988: Use check disallow instantiation helper (GH-26392)
This commit is contained in:
parent
3e7ee02327
commit
fbff5387c3
14 changed files with 37 additions and 51 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue