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

Function test_apply_diff_to_index

test/test_apply_diff.py:99–106  ·  view source on GitHub ↗
(
    testrepo: Repository, old_content: str, patch_diff: Diff
)

Source from the content-addressed store, hash-verified

97
98
99def test_apply_diff_to_index(
100 testrepo: Repository, old_content: str, patch_diff: Diff
101) -> None:
102 # Apply the patch and compare
103 testrepo.apply(patch_diff, ApplyLocation.INDEX)
104
105 assert read_content(testrepo) == old_content
106 assert testrepo.status_file('hello.txt') & FileStatus.INDEX_MODIFIED
107
108
109def test_apply_diff_to_both(

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…