()
| 47 | |
| 48 | |
| 49 | def test_always_fail_decode(): |
| 50 | class _bytes(bytes): |
| 51 | def decode(self, encoding="utf-8", errors="strict"): |
| 52 | raise UnicodeDecodeError( |
| 53 | encoding, self, 0, 0, "Failing intentionally for testing" |
| 54 | ) |
| 55 | |
| 56 | with pytest.raises(CharacterSetDecodeError): |
| 57 | cmd._try_decode(_bytes()) |
| 58 | |
| 59 | |
| 60 | class TestRun: |