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

Function test_lookup_commit

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

Source from the content-addressed store, hash-verified

132
133
134def test_lookup_commit(barerepo: Repository) -> None:
135 commit_sha = '5fe808e8953c12735680c257f56600cb0de44b10'
136 commit = barerepo[commit_sha]
137 assert commit_sha == commit.id
138 assert int(ObjectType.COMMIT) == commit.type
139 assert isinstance(commit, Commit)
140 assert commit.message == (
141 'Second test data commit.\n\nThis commit has some additional text.\n'
142 )
143
144
145def test_lookup_commit_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…