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

Function test_write

test/test_refdb_backend.py:97–102  ·  view source on GitHub ↗
(repo: Repository)

Source from the content-addressed store, hash-verified

95
96
97def test_write(repo: Repository) -> None:
98 master = repo.backend.lookup('refs/heads/master')
99 commit = repo[master.target]
100 ref = pygit2.Reference('refs/heads/test-write', master.target, None)
101 repo.backend.write(ref, False, commit.author, 'Create test-write', None, None)
102 assert repo.backend.lookup('refs/heads/test-write').target == master.target
103
104
105def test_rename(repo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

lookupMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…