From 6f80f5d4446f06d15274ad519cae6929a3565cc0 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 23 Sep 2012 19:55:21 +0200 Subject: Issue #15379: Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings). Patch by Serhiy Storchaka. --- Lib/test/test_codeccallbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/test_codeccallbacks.py') diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py index c5b1e25c20..e656d2fe8f 100644 --- a/Lib/test/test_codeccallbacks.py +++ b/Lib/test/test_codeccallbacks.py @@ -744,7 +744,7 @@ class CodecCallbackTest(unittest.TestCase): raise ValueError self.assertRaises(UnicodeError, codecs.charmap_decode, b"\xff", "strict", {0xff: None}) self.assertRaises(ValueError, codecs.charmap_decode, b"\xff", "strict", D()) - self.assertRaises(TypeError, codecs.charmap_decode, b"\xff", "strict", {0xff: sys.maxunicode+1}) + self.assertRaises(TypeError, codecs.charmap_decode, b"\xff", "strict", {0xff: 0x110000}) def test_encodehelper(self): # enhance coverage of: -- cgit v1.2.1