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

Function test_hash

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

Source from the content-addressed store, hash-verified

191
192
193def test_hash(barerepo: Repository) -> None:
194 data = 'foobarbaz'
195 hashed_sha1 = pygit2.hash(data)
196 written_sha1 = barerepo.create_blob(data)
197 assert hashed_sha1 == written_sha1
198
199
200def test_hashfile(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…