diff options
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 0ed243d..18fa24a 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1,5 +1,6 @@ from test.support import (gc_collect, bigmemtest, _2G, - cpython_only, captured_stdout) + cpython_only, captured_stdout, + check_disallow_instantiation) import locale import re import sre_compile @@ -2224,11 +2225,10 @@ class ImplementationTest(unittest.TestCase): @cpython_only def test_disallow_instantiation(self): # Ensure that the type disallows instantiation (bpo-43916) - self.assertRaises(TypeError, re.Match) - self.assertRaises(TypeError, re.Pattern) + check_disallow_instantiation(self, re.Match) + check_disallow_instantiation(self, re.Pattern) pat = re.compile("") - tp = type(pat.scanner("")) - self.assertRaises(TypeError, tp) + check_disallow_instantiation(self, type(pat.scanner(""))) class ExternalTests(unittest.TestCase): |