diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-04-05 13:35:01 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-04-05 13:35:01 (GMT) |
commit | e49a95fe056af414ffd2cd9ec87398a6b076ae1c (patch) | |
tree | 4b3037d3b0a0ab2cef62ff649844fc51d836436b /Lib/test/test_codeccallbacks.py | |
parent | 872b291b9605f0f5a072137182034959416e36bd (diff) | |
download | cpython-e49a95fe056af414ffd2cd9ec87398a6b076ae1c.zip cpython-e49a95fe056af414ffd2cd9ec87398a6b076ae1c.tar.gz cpython-e49a95fe056af414ffd2cd9ec87398a6b076ae1c.tar.bz2 |
Issue #21118: str.translate() now raises a ValueError, not a TypeError, if the
replacement character is bigger than U+10ffff code point.
Diffstat (limited to 'Lib/test/test_codeccallbacks.py')
-rw-r--r-- | Lib/test/test_codeccallbacks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py index 84804bb..a1ce9cf 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): |