From 99c74ddde812f8723077b173c46e9b70be01d7c2 Mon Sep 17 00:00:00 2001 From: Christian Riedel Date: Tue, 12 Jul 2022 12:37:21 +0200 Subject: [PATCH] fix tests for tags with # in front --- tests/test_check_jira_tag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_check_jira_tag.py b/tests/test_check_jira_tag.py index b31cf88..6f8b3c1 100755 --- a/tests/test_check_jira_tag.py +++ b/tests/test_check_jira_tag.py @@ -115,7 +115,7 @@ def test_empty_commit_msg_but_comments(mock_ini, mock_commit_msg_file, cli_runne assert "Commit message is empty." in result.output -@pytest.mark.parametrize("commit_msg", ["message", "tag", "tag-", "#tag", "#tag-123"]) +@pytest.mark.parametrize("commit_msg", ["message", "message tag", "message tag-", "message #tag", "message #tag-123", "tag message", "tag- message"]) def test_missing_tag(commit_msg, mock_ini, mock_commit_msg_file, cli_runner): """Assert error on missing tag.""" 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): assert "'TAG' tag not found" in result.output -@pytest.mark.parametrize("commit_msg", ["TAG", "TAG-", "#TAG", "#TAG-"]) +@pytest.mark.parametrize("commit_msg", ["message TAG", "message TAG-", "message #TAG", "message #TAG-", "TAG message", "TAG- message"]) def test_missing_tag_number(commit_msg, mock_ini, mock_commit_msg_file, cli_runner): """Assert error on missing tag number.""" mock_commit_msg_file.write_text(commit_msg)