Skip to content

Commit 99c74dd

Browse files
author
Christian Riedel
committed
fix tests for tags with # in front
1 parent 4b024ef commit 99c74dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_check_jira_tag.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def test_empty_commit_msg_but_comments(mock_ini, mock_commit_msg_file, cli_runne
115115
assert "Commit message is empty." in result.output
116116

117117

118-
@pytest.mark.parametrize("commit_msg", ["message", "tag", "tag-", "#tag", "#tag-123"])
118+
@pytest.mark.parametrize("commit_msg", ["message", "message tag", "message tag-", "message #tag", "message #tag-123", "tag message", "tag- message"])
119119
def test_missing_tag(commit_msg, mock_ini, mock_commit_msg_file, cli_runner):
120120
"""Assert error on missing tag."""
121121
mock_commit_msg_file.write_text(commit_msg)
@@ -128,7 +128,7 @@ def test_missing_tag(commit_msg, mock_ini, mock_commit_msg_file, cli_runner):
128128
assert "'TAG' tag not found" in result.output
129129

130130

131-
@pytest.mark.parametrize("commit_msg", ["TAG", "TAG-", "#TAG", "#TAG-"])
131+
@pytest.mark.parametrize("commit_msg", ["message TAG", "message TAG-", "message #TAG", "message #TAG-", "TAG message", "TAG- message"])
132132
def test_missing_tag_number(commit_msg, mock_ini, mock_commit_msg_file, cli_runner):
133133
"""Assert error on missing tag number."""
134134
mock_commit_msg_file.write_text(commit_msg)

0 commit comments

Comments
 (0)