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

Function test_lookup_reference

test/test_refs.py:456–465  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

454
455
456def test_lookup_reference(testrepo: Repository) -> None:
457 repo = testrepo
458
459 # Raise KeyError ?
460 with pytest.raises(KeyError):
461 repo.lookup_reference('refs/foo')
462
463 # Test a lookup
464 reference = repo.lookup_reference('refs/heads/master')
465 assert reference.name == 'refs/heads/master'
466
467
468def test_lookup_reference_dwim(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…