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

Function test_refs_peel

test/test_refs.py:272–280  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

270
271
272def test_refs_peel(testrepo: Repository) -> None:
273 ref = testrepo.references.get('refs/heads/master')
274 assert ref is not None
275 assert testrepo[ref.target].id == ref.peel().id
276 assert not isinstance(ref.raw_target, bytes)
277 assert testrepo[ref.raw_target].id == ref.peel().id
278
279 commit = ref.peel(Commit)
280 assert commit.tree.id == ref.peel(Tree).id
281
282
283def test_refs_equality(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…