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

Function test_lookup_branch_local

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

Source from the content-addressed store, hash-verified

158
159
160def test_lookup_branch_local(testrepo: Repository) -> None:
161 assert testrepo.lookup_branch('master').target == LAST_COMMIT
162 assert testrepo.lookup_branch(b'master').target == LAST_COMMIT
163
164 assert testrepo.lookup_branch('i18n', BranchType.LOCAL).target == I18N_LAST_COMMIT
165 assert testrepo.lookup_branch(b'i18n', BranchType.LOCAL).target == I18N_LAST_COMMIT
166
167 assert testrepo.lookup_branch('not-exists') is None
168 assert testrepo.lookup_branch(b'not-exists') is None
169 if os.name == 'posix': # this call fails with an InvalidSpecError on NT
170 assert testrepo.lookup_branch(b'\xb1') is None
171
172
173def test_listall_branches(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…