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

Function test_create_blob_fromiobase

test/test_blob.py:155–167  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

153
154
155def test_create_blob_fromiobase(testrepo: Repository) -> None:
156 with pytest.raises(TypeError):
157 testrepo.create_blob_fromiobase('bad type') # type: ignore
158
159 f = io.BytesIO(BLOB_CONTENT)
160 blob_oid = testrepo.create_blob_fromiobase(f)
161 blob = testrepo[blob_oid]
162
163 assert isinstance(blob, pygit2.Blob)
164 assert ObjectType.BLOB == blob.type
165
166 assert blob_oid == blob.id
167 assert BLOB_SHA == blob_oid
168
169
170def test_diff_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…