From 64eb8e5a0d85a0e73b69a36466e324ef6d4b4c87 Mon Sep 17 00:00:00 2001 From: Christian Riedel Date: Tue, 12 Jul 2022 12:41:04 +0200 Subject: [PATCH] formatting --- tests/test_add_jira_tag.py | 4 +++- tests/test_check_jira_tag.py | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/tests/test_add_jira_tag.py b/tests/test_add_jira_tag.py index dfac33a..1e011d9 100755 --- a/tests/test_add_jira_tag.py +++ b/tests/test_add_jira_tag.py @@ -138,4 +138,6 @@ class MockBranch: # pylint: disable=too-few-public-methods, missing-class-docst mock_commit_msg_file.write_text("commit message 0815\n#TEST-123") result = cli_runner.invoke(main, ["--jira-tag=TEST", str(mock_commit_msg_file)]) assert result.exit_code == 0 - assert mock_commit_msg_file.read_text() == "TEST-123: commit message 0815\n#TEST-123" + assert ( + mock_commit_msg_file.read_text() == "TEST-123: commit message 0815\n#TEST-123" + ) diff --git a/tests/test_check_jira_tag.py b/tests/test_check_jira_tag.py index 6f8b3c1..b1acc83 100755 --- a/tests/test_check_jira_tag.py +++ b/tests/test_check_jira_tag.py @@ -115,7 +115,18 @@ 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", "message tag", "message tag-", "message #tag", "message #tag-123", "tag message", "tag- message"]) +@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 +139,17 @@ 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", ["message TAG", "message TAG-", "message #TAG", "message #TAG-", "TAG message", "TAG- message"]) +@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)