Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7bd16c3

Browse files
test: add test to cover schema_pattern is None case
1 parent f66afbc commit 7bd16c3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎tests/test_cz_base.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Optional
2+
13
import pytest
24

35
from commitizen.cz.base import BaseCommitizen
@@ -10,6 +12,9 @@ def questions(self):
1012
def message(self, answers: dict):
1113
return answers["commit"]
1214

15+
def schema_pattern(self) -> Optional[str]:
16+
return None
17+
1318

1419
def test_base_raises_error(config):
1520
with pytest.raises(TypeError):
@@ -38,6 +43,11 @@ def test_schema(config):
3843
cz.schema()
3944

4045

46+
def test_validate_commit_message(config):
47+
cz = DummyCz(config)
48+
assert cz.validate_commit_message("test", None, False, [], 0) == (True, [])
49+
50+
4151
def test_info(config):
4252
cz = DummyCz(config)
4353
with pytest.raises(NotImplementedError):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /