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

Function test_diff_blob

test/test_blob.py:170–176  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

168
169
170def test_diff_blob(testrepo: Repository) -> None:
171 blob = testrepo[BLOB_SHA]
172 assert isinstance(blob, pygit2.Blob)
173 old_blob = testrepo['3b18e512dba79e4c8300dd08aeb37f8e728b8dad']
174 assert isinstance(old_blob, pygit2.Blob)
175 patch = blob.diff(old_blob, old_as_path='hello.txt')
176 assert len(patch.hunks) == 1
177
178
179def test_diff_blob_to_buffer(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

diffMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…