mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
gh-71339: Use new assertion methods in tests (GH-129046)
This commit is contained in:
parent
bb244fd33d
commit
2602d8ae98
117 changed files with 407 additions and 445 deletions
|
@ -3802,7 +3802,7 @@ class LocaleCodecTest(unittest.TestCase):
|
|||
with self.assertRaises(RuntimeError) as cm:
|
||||
self.decode(encoded, errors)
|
||||
errmsg = str(cm.exception)
|
||||
self.assertTrue(errmsg.startswith("decode error: "), errmsg)
|
||||
self.assertStartsWith(errmsg, "decode error: ")
|
||||
else:
|
||||
decoded = self.decode(encoded, errors)
|
||||
self.assertEqual(decoded, expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue