mirror of
https://github.com/python/cpython.git
synced 2025-09-25 01:43:11 +00:00
Issue #15379: Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
This commit is contained in:
parent
1df43d33d2
commit
e3ae321222
4 changed files with 135 additions and 3 deletions
|
@ -717,7 +717,7 @@ class CodecCallbackTest(unittest.TestCase):
|
|||
raise ValueError
|
||||
self.assertRaises(UnicodeError, codecs.charmap_decode, "\xff", "strict", {0xff: None})
|
||||
self.assertRaises(ValueError, codecs.charmap_decode, "\xff", "strict", D())
|
||||
self.assertRaises(TypeError, codecs.charmap_decode, "\xff", "strict", {0xff: sys.maxunicode+1})
|
||||
self.assertRaises(TypeError, codecs.charmap_decode, "\xff", "strict", {0xff: 0x110000})
|
||||
|
||||
def test_encodehelper(self):
|
||||
# enhance coverage of:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue