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

Function test_lookup_blob

test/test_repository_bare.py:117–124  ·  view source on GitHub ↗
(barerepo: Repository)

Source from the content-addressed store, hash-verified

115
116
117def test_lookup_blob(barerepo: Repository) -> None:
118 with pytest.raises(TypeError):
119 barerepo[123] # type: ignore
120 assert barerepo[BLOB_OID].id == BLOB_HEX
121 a = barerepo[BLOB_HEX]
122 assert b'a contents\n' == a.read_raw()
123 assert BLOB_HEX == a.id
124 assert int(ObjectType.BLOB) == a.type
125
126
127def test_lookup_blob_prefix(barerepo: 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…