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

Function test_rename

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

Source from the content-addressed store, hash-verified

630
631
632def test_rename(testrepo: Repository) -> None:
633 # We add a tag as a new reference that points to "origin/master"
634 reference = testrepo.create_reference('refs/tags/version1', LAST_COMMIT)
635 assert reference.name == 'refs/tags/version1'
636 reference.rename('refs/tags/version2')
637 assert reference.name == 'refs/tags/version2'
638
639
640# def test_reload(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

create_referenceMethod · 0.80
renameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…