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

Function test_patch_create_from_blob_buffer

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

Source from the content-addressed store, hash-verified

109
110
111def test_patch_create_from_blob_buffer(testrepo: Repository) -> None:
112 old_blob = testrepo[BLOB_OLD_SHA]
113 assert isinstance(old_blob, Blob)
114 patch = pygit2.Patch.create_from(
115 old_blob,
116 BLOB_NEW_CONTENT,
117 old_as_path=BLOB_OLD_PATH,
118 new_as_path=BLOB_NEW_PATH,
119 )
120
121 assert patch.text == BLOB_PATCH
122
123
124def test_patch_create_from_blob_buffer_add(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…