diff --git a/Lib/test/test_ucn.py b/Lib/test/test_ucn.py index 1d303dc97d7..397d6cd45d9 100644 --- a/Lib/test/test_ucn.py +++ b/Lib/test/test_ucn.py @@ -147,7 +147,7 @@ class UnicodeNamesTest(unittest.TestCase): except MemoryError: raise unittest.SkipTest("not enough memory") self.assertEqual(len(x), len(b'\\N{SPACE}') + (_testcapi.UINT_MAX + 1)) - self.assertRaisesRegex(UnicodeError, + self.assertRaisesRegexp(UnicodeError, 'unknown Unicode character name', x.decode, 'unicode-escape' )