gh-136327: Fix inconsistent `TypeError` messages regarding invalid values after * and ** (#136395)

This commit is contained in:
Tapeline 2025-10-25 00:12:49 +05:00 committed by GitHub
parent b3c713a0af
commit 4f8e7b5ac5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 36 deletions

View file

@ -1882,7 +1882,7 @@ def test_bad_newobj_ex_args(self):
with self.assertRaises(TypeError) as cm:
self.dumps(obj, proto)
self.assertEqual(str(cm.exception),
'functools.partial() argument after ** must be a mapping, not list')
'Value after ** must be a mapping, not list')
self.assertEqual(cm.exception.__notes__, [
'when serializing test.pickletester.REX object'])
else: