Skip to content

Commit

Permalink
Re-word test commit titles and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
g3n35i5 committed Jan 8, 2024
1 parent 865da76 commit d0cb82f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/unit/test_update_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,10 @@ def _create_commit_mock(i: int) -> MagicMock:
argnames=["commit_messages", "expected_title"],
argvalues=[
([], PR_TITLE),
(["Lorem ipsum"], "Lorem ipsum"),
(["Lorem ipsum\n\ndolor sit amet\n"], "Lorem ipsum"),
(["Lorem ipsum\ndolor sit amet\n"], "Lorem ipsum"),
(["Lorem ipsum\n\ndolor sit amet\n", "Commit title\n Commit body.\n"], PR_TITLE),
(["Commit Title"], "Commit Title"),
(["Commit Title\n\nCommit Body\n"], "Commit Title"),
(["Commit Title\nCommit Body\n"], "Commit Title"),
(["Commit Title 1\n\nCommit Body 1\n", "Commit Title 2\n Commit body 1.\n"], PR_TITLE),
],
)
def test_get_pr_title(commit_messages: List[str], expected_title: str) -> None:
Expand All @@ -426,14 +426,14 @@ def test_get_pr_title(commit_messages: List[str], expected_title: str) -> None:
"Contains the following changes to get up-to-date with the newest version of the template's 'dev' branch."
"\n\n- \n",
), # Empty commit should never happen. But this test shows, that we do not crash.
(["Lorem ipsum"], ""),
(["Lorem ipsum\n\ndolor sit amet"], "dolor sit amet"),
(["Lorem ipsum\ndolor sit amet\n"], "dolor sit amet"),
(["Commit Title"], ""),
(["Commit Title\n\nCommit Body"], "Commit Body"),
(["Commit Title\nCommit Body\n"], "Commit Body"),
(
["Lorem ipsum", "Commit title\n\nCommit body.\n"],
["Commit Title", "Commit title\n\nCommit body.\n"],
"Contains the following changes to get up-to-date with the newest version of the template's 'dev' branch."
"\n\n"
"- Lorem ipsum\n\n"
"- Commit Title\n\n"
"- Commit title\n \n Commit body.\n",
),
],
Expand Down

0 comments on commit d0cb82f

Please sign in to comment.