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

Function test_patch_delete_blob

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

Source from the content-addressed store, hash-verified

255
256
257def test_patch_delete_blob(testrepo: Repository) -> None:
258 blob = testrepo[BLOB_OLD_SHA]
259 assert isinstance(blob, Blob)
260 patch = pygit2.Patch.create_from(
261 blob,
262 None,
263 old_as_path=BLOB_OLD_PATH,
264 new_as_path=BLOB_NEW_PATH,
265 )
266
267 # Make sure that even after deleting the blob the patch still has the
268 # necessary references to generate its patch
269 del blob
270 assert patch.text == BLOB_PATCH_DELETED
271
272
273def test_patch_multi_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…