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

Function test_branches_getitem

test/test_branch.py:43–51  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

41
42
43def test_branches_getitem(testrepo: Repository) -> None:
44 branch = testrepo.branches['master']
45 assert branch.target == LAST_COMMIT
46
47 branch = testrepo.branches.local['i18n']
48 assert branch.target == I18N_LAST_COMMIT
49 assert testrepo.branches.get('not-exists') is None
50 with pytest.raises(KeyError):
51 testrepo.branches['not-exists']
52
53
54def test_branches(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…