Skip to content

Commit

Permalink
test: add test to cover schema_pattern is None case
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktziegler committed Sep 13, 2024
1 parent f66afbc commit fbf3813
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_cz_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def questions(self):
def message(self, answers: dict):
return answers["commit"]

def schema_pattern(self) -> str | None:
return None


def test_base_raises_error(config):
with pytest.raises(TypeError):
Expand Down Expand Up @@ -38,6 +41,11 @@ def test_schema(config):
cz.schema()


def test_validate_commit_message(config):
cz = DummyCz(config)
assert cz.validate_commit_message("test", None, False, [], 0) == (True, [])


def test_info(config):
cz = DummyCz(config)
with pytest.raises(NotImplementedError):
Expand Down

0 comments on commit fbf3813

Please sign in to comment.