make git idempotent

This commit is contained in:
Jörg Thalheim
2023-09-22 16:38:46 +02:00
parent d9fd0e2a65
commit b482dcd466
2 changed files with 12 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ def test_commit_file_outside_git_raises_error(git_repo: Path) -> None:
# commit the file
with pytest.raises(ClanError):
git.commit_file(Path(tmp.name), git_repo, "test commit")
# this should not fail but skip the commit
git.commit_file(Path(tmp.name), git_repo, "test commit")
def test_commit_file_not_existing_raises_error(git_repo: Path) -> None: