Skip to content

Commit

Permalink
style(tests): format tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shifqu committed May 6, 2021
1 parent ba58b22 commit e107411
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
6 changes: 1 addition & 5 deletions tests/commands/test_check_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ def test_check_conventional_commit_succeeds(mocker, capsys):


@pytest.mark.parametrize(
"commit_msg",
(
"feat!(lang): removed polish language",
"no conventional commit",
),
"commit_msg", ("feat!(lang): removed polish language", "no conventional commit",),
)
def test_check_no_conventional_commit(commit_msg, config, mocker, tmpdir):
with pytest.raises(InvalidCommitMessageError):
Expand Down
20 changes: 6 additions & 14 deletions tests/test_cz_conventional_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,13 @@ def test_info(config):
assert isinstance(info, str)


@pytest.mark.parametrize(("commit_message", "expected_message"),
@pytest.mark.parametrize(
("commit_message", "expected_message"),
[
(
"test(test_scope): this is test msg",
"this is test msg",
),
(
"test(test_scope)!: this is test msg",
"this is test msg",
),
(
"test!(test_scope): this is test msg",
"",
),
]
("test(test_scope): this is test msg", "this is test msg",),
("test(test_scope)!: this is test msg", "this is test msg",),
("test!(test_scope): this is test msg", "",),
],
)
def test_process_commit(commit_message, expected_message, config):
conventional_commits = ConventionalCommitsCz(config)
Expand Down

0 comments on commit e107411

Please sign in to comment.