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

Function test_refs_rename

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

Source from the content-addressed store, hash-verified

183
184
185def test_refs_rename(testrepo: Repository) -> None:
186 # We add a tag as a new reference that points to "origin/master"
187 reference = testrepo.references.create('refs/tags/version1', LAST_COMMIT)
188 assert reference.name == 'refs/tags/version1'
189 reference.rename('refs/tags/version2')
190 assert reference.name == 'refs/tags/version2'
191
192 with pytest.raises(AlreadyExistsError):
193 reference.rename('refs/tags/version2')
194
195 with pytest.raises(InvalidSpecError):
196 reference.rename('b1')
197
198
199# def test_reload(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

createMethod · 0.45
renameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…