def test_message_1(): """test that commit message is read""" repo = GitRepo(FIXTURES / "git01", "main", "FETCH_HEAD") try: assert "Test commit message" in repo.message("FETCH_HEAD") finally: repo.cleanup()
def test_message_2(): """test that commit messages from a range are read""" repo = GitRepo(FIXTURES / "git03", "main", "FETCH_HEAD") try: message = repo.message("9ee55a5b8723e2dd762421ebdc4faf5a349052d7.." "f52af064b7d715ea87595e9b21f1ae6323064f88") finally: repo.cleanup() assert "Another commit" in message assert "/force-rebuild" in message assert "Initial commit" not in message