mirror of
https://github.com/python/cpython.git
synced 2024-11-24 08:52:25 +01: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
@ -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…
Reference in New Issue
Block a user