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

Function test_patch_create_from_blob_buffer_delete

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

Source from the content-addressed store, hash-verified

133
134
135def test_patch_create_from_blob_buffer_delete(testrepo: Repository) -> None:
136 old_blob = testrepo[BLOB_OLD_SHA]
137 assert isinstance(old_blob, Blob)
138
139 patch = pygit2.Patch.create_from(
140 old_blob,
141 None,
142 old_as_path=BLOB_OLD_PATH,
143 new_as_path=BLOB_NEW_PATH,
144 )
145
146 assert patch.text == BLOB_PATCH_DELETED
147
148
149def test_patch_create_from_bad_old_type_arg(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…