MCPcopy
hub / github.com/langroid/langroid / test_git_diff_file

Function test_git_diff_file

tests/main/test_git_utils.py:135–147  ·  view source on GitHub ↗
(temp_git_repo)

Source from the content-addressed store, hash-verified

133
134
135def test_git_diff_file(temp_git_repo):
136 test_file = os.path.join(temp_git_repo.working_dir, "test.txt")
137 with open(test_file, "w") as f:
138 f.write("Initial content")
139 git_commit_file(temp_git_repo, "test.txt", "Initial commit")
140
141 with open(test_file, "w") as f:
142 f.write("Modified content")
143 git_commit_file(temp_git_repo, "test.txt", "Modified commit")
144
145 diff = git_diff_file(temp_git_repo, "test.txt")
146 assert "Initial content" in diff
147 assert "Modified content" in diff

Callers

nothing calls this directly

Calls 3

git_commit_fileFunction · 0.90
git_diff_fileFunction · 0.90
writeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…