(temp_git_repo)
| 78 | |
| 79 | |
| 80 | def test_git_commit_mods(temp_git_repo): |
| 81 | test_file = os.path.join(temp_git_repo.working_dir, "test.txt") |
| 82 | with open(test_file, "w") as f: |
| 83 | f.write("Test content") |
| 84 | |
| 85 | # Add the file to the git index |
| 86 | temp_git_repo.index.add([test_file]) |
| 87 | |
| 88 | git_commit_mods(temp_git_repo) |
| 89 | |
| 90 | assert "test.txt" in temp_git_repo.git.ls_files().split() |
| 91 | |
| 92 | # Check if the file was actually committed |
| 93 | assert len(temp_git_repo.head.commit.tree.blobs) > 0 |
| 94 | assert any(blob.name == "test.txt" for blob in temp_git_repo.head.commit.tree.blobs) |
| 95 | |
| 96 | |
| 97 | def test_git_restore_repo(temp_git_repo): |
nothing calls this directly
no test coverage detected
searching dependent graphs…