MCPcopy Create free account
hub / github.com/libgit2/pygit2 / test_apply_diff_to_both

Function test_apply_diff_to_both

test/test_apply_diff.py:109–116  ·  view source on GitHub ↗
(
    testrepo: Repository, new_content: str, patch_diff: Diff
)

Source from the content-addressed store, hash-verified

107
108
109def test_apply_diff_to_both(
110 testrepo: Repository, new_content: str, patch_diff: Diff
111) -> None:
112 # Apply the patch and compare
113 testrepo.apply(patch_diff, ApplyLocation.BOTH)
114
115 assert read_content(testrepo) == new_content
116 assert testrepo.status_file('hello.txt') & FileStatus.INDEX_MODIFIED
117
118
119def test_diff_applies_to_workdir(

Callers

nothing calls this directly

Calls 1

read_contentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…