Skip to content

Commit b72eb69

Browse files
committed
test(commands/check): add test case for checking bump message in conventional commit
1 parent b913b1e commit b72eb69

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎tests/commands/test_check_command.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,19 @@ def test_check_no_conventional_commit(config, mocker, tmpdir):
9393
error_mock.assert_called_once()
9494

9595

96-
def test_check_conventional_commit(config, mocker, tmpdir):
96+
@pytest.mark.parametrize(
97+
"commit_msg",
98+
(
99+
"feat(lang): added polish language",
100+
"feat: add polish language",
101+
"bump: 0.0.1 -> 1.0.0",
102+
),
103+
)
104+
def test_check_conventional_commit(commit_msg, config, mocker, tmpdir):
97105
success_mock = mocker.patch("commitizen.out.success")
98106

99107
tempfile = tmpdir.join("temp_commit_file")
100-
tempfile.write("feat(lang): added polish language")
108+
tempfile.write(commit_msg)
101109

102110
check_cmd = commands.Check(config=config, arguments={"commit_msg_file": tempfile})
103111

0 commit comments

Comments
 (0)