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

Function test_diff_patch

test/test_diff.py:339–345  ·  view source on GitHub ↗
(barerepo: Repository)

Source from the content-addressed store, hash-verified

337
338
339def test_diff_patch(barerepo: Repository) -> None:
340 commit_a = barerepo[COMMIT_SHA1_1]
341 commit_b = barerepo[COMMIT_SHA1_2]
342
343 diff = commit_a.tree.diff_to_tree(commit_b.tree)
344 assert diff.patch == PATCH
345 assert len(diff) == len([patch for patch in diff])
346
347
348def test_diff_ids(barerepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

diff_to_treeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…