Skip to content

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy