(self)
| 3420 | )) |
| 3421 | |
| 3422 | def test_cp708(self): |
| 3423 | self.check_encode(708, ( |
| 3424 | ('abc2%', 'strict', b'abc2%'), |
| 3425 | ('\u060c\u0621\u064a', 'strict', b'\xac\xc1\xea'), |
| 3426 | ('\u2562\xe7\xa0', 'strict', b'\x86\x87\xff'), |
| 3427 | ('\x9a\x9f', 'strict', b'\x9a\x9f'), |
| 3428 | ('\u256b', 'strict', b'\xc0'), |
| 3429 | # test error handlers |
| 3430 | ('[\u0662]', 'strict', None), |
| 3431 | ('[\u0662]', 'ignore', b'[]'), |
| 3432 | ('[\u0662]', 'replace', b'[?]'), |
| 3433 | ('\udca0', 'surrogateescape', b'\xa0'), |
| 3434 | ('\udca0', 'surrogatepass', None), |
| 3435 | )) |
| 3436 | self.check_decode(708, ( |
| 3437 | (b'abc2%', 'strict', 'abc2%'), |
| 3438 | (b'\xac\xc1\xea', 'strict', '\u060c\u0621\u064a'), |
| 3439 | (b'\x86\x87\xff', 'strict', '\u2562\xe7\xa0'), |
| 3440 | (b'\x9a\x9f', 'strict', '\x9a\x9f'), |
| 3441 | (b'\xc0', 'strict', '\u256b'), |
| 3442 | # test error handlers |
| 3443 | (b'\xa0', 'strict', None), |
| 3444 | (b'[\xa0]', 'ignore', '[]'), |
| 3445 | (b'[\xa0]', 'replace', '[\ufffd]'), |
| 3446 | (b'[\xa0]', 'backslashreplace', '[\\xa0]'), |
| 3447 | (b'[\xa0]', 'surrogateescape', '[\udca0]'), |
| 3448 | (b'[\xa0]', 'surrogatepass', None), |
| 3449 | )) |
| 3450 | |
| 3451 | def test_cp20106(self): |
| 3452 | self.check_encode(20106, ( |
nothing calls this directly
no test coverage detected