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

Method test_cp20106

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

Source from the content-addressed store, hash-verified

3449 ))
3450
3451 def test_cp20106(self):
3452 self.check_encode(20106, (
3453 ('abc', 'strict', b'abc'),
3454 ('\xa7\xc4\xdf', 'strict', b'@[~'),
3455 # test error handlers
3456 ('@', 'strict', None),
3457 ('@', 'ignore', b''),
3458 ('@', 'replace', b'?'),
3459 ('\udcbf', 'surrogateescape', b'\xbf'),
3460 ('\udcbf', 'surrogatepass', None),
3461 ))
3462 self.check_decode(20106, (
3463 (b'abc', 'strict', 'abc'),
3464 (b'@[~', 'strict', '\xa7\xc4\xdf'),
3465 (b'\xe1\xfe', 'strict', 'a\xdf'),
3466 # test error handlers
3467 (b'(\xbf)', 'strict', None),
3468 (b'(\xbf)', 'ignore', '()'),
3469 (b'(\xbf)', 'replace', '(\ufffd)'),
3470 (b'(\xbf)', 'backslashreplace', '(\\xbf)'),
3471 (b'(\xbf)', 'surrogateescape', '(\udcbf)'),
3472 (b'(\xbf)', 'surrogatepass', None),
3473 ))
3474
3475 @unittest.expectedFailure # TODO: RUSTPYTHON; # TODO: RUSTPYTHON
3476 def test_cp_utf7(self):

Callers

nothing calls this directly

Calls 2

check_encodeMethod · 0.95
check_decodeMethod · 0.95

Tested by

no test coverage detected