(self)
| 3474 | |
| 3475 | @unittest.expectedFailure # TODO: RUSTPYTHON; # TODO: RUSTPYTHON |
| 3476 | def test_cp_utf7(self): |
| 3477 | cp = 65000 |
| 3478 | self.check_encode(cp, ( |
| 3479 | ('abc', 'strict', b'abc'), |
| 3480 | ('\xe9\u20ac', 'strict', b'+AOkgrA-'), |
| 3481 | ('\U0010ffff', 'strict', b'+2//f/w-'), |
| 3482 | ('\udc80', 'strict', b'+3IA-'), |
| 3483 | ('\ufffd', 'strict', b'+//0-'), |
| 3484 | )) |
| 3485 | self.check_decode(cp, ( |
| 3486 | (b'abc', 'strict', 'abc'), |
| 3487 | (b'+AOkgrA-', 'strict', '\xe9\u20ac'), |
| 3488 | (b'+2//f/w-', 'strict', '\U0010ffff'), |
| 3489 | (b'+3IA-', 'strict', '\udc80'), |
| 3490 | (b'+//0-', 'strict', '\ufffd'), |
| 3491 | # invalid bytes |
| 3492 | (b'[+/]', 'strict', '[]'), |
| 3493 | (b'[\xff]', 'strict', '[\xff]'), |
| 3494 | )) |
| 3495 | |
| 3496 | def test_multibyte_encoding(self): |
| 3497 | self.check_decode(932, ( |
nothing calls this directly
no test coverage detected