MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / test_always_fail_decode

Function test_always_fail_decode

tests/test_cmd.py:49–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48
49def 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
60class TestRun:

Callers

nothing calls this directly

Calls 1

_bytesClass · 0.85

Tested by

no test coverage detected