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

Function test_patch_create_from_blobs

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

Source from the content-addressed store, hash-verified

93
94
95def test_patch_create_from_blobs(testrepo: Repository) -> None:
96 old_blob = testrepo[BLOB_OLD_SHA]
97 new_blob = testrepo[BLOB_NEW_SHA]
98 assert isinstance(old_blob, Blob)
99 assert isinstance(new_blob, Blob)
100
101 patch = pygit2.Patch.create_from(
102 old_blob,
103 new_blob,
104 old_as_path=BLOB_OLD_PATH,
105 new_as_path=BLOB_NEW_PATH,
106 )
107
108 assert patch.text == BLOB_PATCH2
109
110
111def test_patch_create_from_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…