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

Function test_add

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

Source from the content-addressed store, hash-verified

61
62
63def test_add(testrepo: Repository) -> None:
64 index = testrepo.index
65
66 sha = '0907563af06c7464d62a70cdd135a6ba7d2b41d8'
67 assert 'bye.txt' not in index
68 index.add('bye.txt')
69 assert 'bye.txt' in index
70 assert len(index) == 3
71 assert index['bye.txt'].id == sha
72
73
74def test_add_aspath(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…