diff options
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r-- | Lib/test/test_functools.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 3320ab7..78a8a5f 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -951,8 +951,9 @@ class TestCmpToKeyC(TestCmpToKey, unittest.TestCase): @support.cpython_only def test_disallow_instantiation(self): # Ensure that the type disallows instantiation (bpo-43916) - tp = type(c_functools.cmp_to_key(None)) - self.assertRaises(TypeError, tp) + support.check_disallow_instantiation( + self, type(c_functools.cmp_to_key(None)) + ) class TestCmpToKeyPy(TestCmpToKey, unittest.TestCase): |