def test_git_extract_commit_message_error(git_repo_empty): """On error, the commit message tag should not be extracted, and should internally raise and log the error.""" with pytest.raises(ValueError): git.extract_commit_message(cwd=git_repo_empty)
def test_git_extract_commit_message(git_repo): """Make sure that the git commit message is extracted properly.""" expected_msg = "this is a commit msg" assert git.extract_commit_message(cwd=git_repo) == expected_msg