MCPcopy Index your code
hub / github.com/commitizen-tools/commitizen / test_from_str_with_invalid_values

Function test_from_str_with_invalid_values

tests/test_exceptions.py:29–38  ·  view source on GitHub ↗

Test from_str with invalid values.

()

Source from the content-addressed store, hash-verified

27
28
29def test_from_str_with_invalid_values():
30 """Test from_str with invalid values."""
31 with pytest.raises(KeyError):
32 ExitCode.from_str("invalid_name")
33 with pytest.raises(ValueError, match="is not a valid ExitCode"):
34 ExitCode.from_str("999") # Out of range decimal
35 with pytest.raises(KeyError):
36 ExitCode.from_str("")
37 with pytest.raises(KeyError):
38 ExitCode.from_str(" ")

Callers

nothing calls this directly

Calls 1

from_strMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…