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

Function test_patch_create_blob_add

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

Source from the content-addressed store, hash-verified

242
243
244def test_patch_create_blob_add(testrepo: Repository) -> None:
245 blob = testrepo[testrepo.create_blob(BLOB_NEW_CONTENT)]
246 assert isinstance(blob, Blob)
247 patch = pygit2.Patch.create_from(
248 None,
249 blob,
250 old_as_path=BLOB_OLD_PATH,
251 new_as_path=BLOB_NEW_PATH,
252 )
253
254 assert patch.text == BLOB_PATCH_ADDED
255
256
257def test_patch_delete_blob(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…