summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codeccallbacks.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-04-05 13:35:01 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-04-05 13:35:01 (GMT)
commite49a95fe056af414ffd2cd9ec87398a6b076ae1c (patch)
tree4b3037d3b0a0ab2cef62ff649844fc51d836436b /Lib/test/test_codeccallbacks.py
parent872b291b9605f0f5a072137182034959416e36bd (diff)
downloadcpython-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.py2
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):