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

Function test_create_entry

test/test_index.py:255–260  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

253
254
255def test_create_entry(testrepo: Repository) -> None:
256 index = testrepo.index
257 hello_entry = index['hello.txt']
258 entry = pygit2.IndexEntry('README.md', hello_entry.id, hello_entry.mode)
259 index.add(entry)
260 assert '60e769e57ae1d6a2ab75d8d253139e6260e1f912' == index.write_tree()
261
262
263def test_create_entry_aspath(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

write_treeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…