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

Function test_patch_create_blob_blobs

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

Source from the content-addressed store, hash-verified

200
201
202def test_patch_create_blob_blobs(testrepo: Repository) -> None:
203 old_blob = testrepo[testrepo.create_blob(BLOB_OLD_CONTENT)]
204 new_blob = testrepo[testrepo.create_blob(BLOB_NEW_CONTENT)]
205 assert isinstance(old_blob, Blob)
206 assert isinstance(new_blob, Blob)
207
208 patch = pygit2.Patch.create_from(
209 old_blob,
210 new_blob,
211 old_as_path=BLOB_OLD_PATH,
212 new_as_path=BLOB_NEW_PATH,
213 )
214
215 assert patch.text == BLOB_PATCH
216
217
218def test_patch_create_blob_buffer(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…