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

Function test_patch_create_blob_buffer

test/test_patch.py:218–228  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

216
217
218def test_patch_create_blob_buffer(testrepo: Repository) -> None:
219 blob = testrepo[testrepo.create_blob(BLOB_OLD_CONTENT)]
220 assert isinstance(blob, Blob)
221 patch = pygit2.Patch.create_from(
222 blob,
223 BLOB_NEW_CONTENT,
224 old_as_path=BLOB_OLD_PATH,
225 new_as_path=BLOB_NEW_PATH,
226 )
227
228 assert patch.text == BLOB_PATCH
229
230
231def test_patch_create_blob_delete(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…