From e49a95fe056af414ffd2cd9ec87398a6b076ae1c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 5 Apr 2014 15:35:01 +0200 Subject: [PATCH] Issue #21118: str.translate() now raises a ValueError, not a TypeError, if the replacement character is bigger than U+10ffff code point. --- Lib/test/test_codeccallbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py index 84804bb0daf..a1ce9cf78ad 100644 --- a/Lib/test/test_codeccallbacks.py +++ b/Lib/test/test_codeccallbacks.py @@ -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):