mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Issue #21118: str.translate() now raises a ValueError, not a TypeError, if the
replacement character is bigger than U+10ffff code point.
This commit is contained in:
parent
872b291b96
commit
e49a95fe05
1 changed files with 1 additions and 1 deletions
|
@ -819,7 +819,7 @@ class CodecCallbackTest(unittest.TestCase):
|
|||
def __getitem__(self, key):
|
||||
raise ValueError
|
||||
#self.assertRaises(ValueError, "\xff".translate, D())
|
||||
self.assertRaises(TypeError, "\xff".translate, {0xff: sys.maxunicode+1})
|
||||
self.assertRaises(ValueError, "\xff".translate, {0xff: sys.maxunicode+1})
|
||||
self.assertRaises(TypeError, "\xff".translate, {0xff: ()})
|
||||
|
||||
def test_bug828737(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue