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

Function test_peel

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

Source from the content-addressed store, hash-verified

743
744
745def test_peel(testrepo: Repository) -> None:
746 repo = testrepo
747 ref = repo.lookup_reference('refs/heads/master')
748 assert repo[ref.target].id == ref.peel().id
749 assert isinstance(ref.raw_target, Oid)
750 assert repo[ref.raw_target].id == ref.peel().id
751
752 commit = ref.peel(Commit)
753 assert commit.tree.id == ref.peel(Tree).id
754
755
756def test_valid_reference_names_ascii() -> 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…