MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_multibyte_encoding

Method test_multibyte_encoding

Lib/test/test_codecs.py:3496–3508  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3494 ))
3495
3496 def test_multibyte_encoding(self):
3497 self.check_decode(932, (
3498 (b'\x84\xe9\x80', 'ignore', '\u9a3e'),
3499 (b'\x84\xe9\x80', 'replace', '\ufffd\u9a3e'),
3500 ))
3501 self.check_decode(self.CP_UTF8, (
3502 (b'\xff\xf4\x8f\xbf\xbf', 'ignore', '\U0010ffff'),
3503 (b'\xff\xf4\x8f\xbf\xbf', 'replace', '\ufffd\U0010ffff'),
3504 ))
3505 self.check_encode(self.CP_UTF8, (
3506 ('[\U0010ffff\uDC80]', 'ignore', b'[\xf4\x8f\xbf\xbf]'),
3507 ('[\U0010ffff\uDC80]', 'replace', b'[\xf4\x8f\xbf\xbf?]'),
3508 ))
3509
3510 def test_code_page_decode_flags(self):
3511 # Issue #36312: For some code pages (e.g. UTF-7) flags for

Callers

nothing calls this directly

Calls 2

check_decodeMethod · 0.95
check_encodeMethod · 0.95

Tested by

no test coverage detected