(self)
| 3437 | )) |
| 3438 | |
| 3439 | def test_cp20106(self): |
| 3440 | self.check_encode(20106, ( |
| 3441 | ('abc', 'strict', b'abc'), |
| 3442 | ('\xa7\xc4\xdf', 'strict', b'@[~'), |
| 3443 | # test error handlers |
| 3444 | ('@', 'strict', None), |
| 3445 | ('@', 'ignore', b''), |
| 3446 | ('@', 'replace', b'?'), |
| 3447 | ('\udcbf', 'surrogateescape', b'\xbf'), |
| 3448 | ('\udcbf', 'surrogatepass', None), |
| 3449 | )) |
| 3450 | self.check_decode(20106, ( |
| 3451 | (b'abc', 'strict', 'abc'), |
| 3452 | (b'@[~', 'strict', '\xa7\xc4\xdf'), |
| 3453 | (b'\xe1\xfe', 'strict', 'a\xdf'), |
| 3454 | # test error handlers |
| 3455 | (b'(\xbf)', 'strict', None), |
| 3456 | (b'(\xbf)', 'ignore', '()'), |
| 3457 | (b'(\xbf)', 'replace', '(\ufffd)'), |
| 3458 | (b'(\xbf)', 'backslashreplace', '(\\xbf)'), |
| 3459 | (b'(\xbf)', 'surrogateescape', '(\udcbf)'), |
| 3460 | (b'(\xbf)', 'surrogatepass', None), |
| 3461 | )) |
| 3462 | |
| 3463 | def test_cp_utf7(self): |
| 3464 | cp = 65000 |
nothing calls this directly
no test coverage detected