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

Function test_refs_set_target

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

Source from the content-addressed store, hash-verified

125
126
127def test_refs_set_target(testrepo: Repository) -> None:
128 reference = testrepo.references.get('HEAD')
129 assert reference is not None
130 assert reference.target == 'refs/heads/master'
131 assert reference.raw_target == b'refs/heads/master'
132 reference.set_target('refs/heads/i18n')
133 assert reference.target == 'refs/heads/i18n'
134 assert reference.raw_target == b'refs/heads/i18n'
135
136
137def test_refs_get_shorthand(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

set_targetMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…