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

Function test_describe_committish

test/test_describe.py:77–87  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

75
76
77def test_describe_committish(testrepo: Repository) -> None:
78 add_tag(testrepo, 'thetag', 'acecd5ea2924a4b900e7e149496e1f4b57976e51')
79 assert 'thetag-4-g2be5719' == testrepo.describe(committish='HEAD')
80 assert 'thetag-1-g5ebeeeb' == testrepo.describe(committish='HEAD^')
81
82 assert 'thetag-4-g2be5719' == testrepo.describe(committish=testrepo.head)
83
84 assert 'thetag-1-g6aaa262' == testrepo.describe(
85 committish='6aaa262e655dd54252e5813c8e5acd7780ed097d'
86 )
87 assert 'thetag-1-g6aaa262' == testrepo.describe(committish='6aaa262')
88
89
90def test_describe_follows_first_branch_only(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

add_tagFunction · 0.85
describeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…