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

Function test_descendent_of

test/test_repository.py:294–316  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

292
293
294def test_descendent_of(testrepo: Repository) -> None:
295 assert not testrepo.descendant_of(
296 '5ebeeebb320790caf276b9fc8b24546d63316533',
297 '4ec4389a8068641da2d6578db0419484972284c8',
298 )
299 assert not testrepo.descendant_of(
300 '5ebeeebb320790caf276b9fc8b24546d63316533',
301 '5ebeeebb320790caf276b9fc8b24546d63316533',
302 )
303 assert testrepo.descendant_of(
304 '5ebeeebb320790caf276b9fc8b24546d63316533',
305 'acecd5ea2924a4b900e7e149496e1f4b57976e51',
306 )
307 assert not testrepo.descendant_of(
308 'acecd5ea2924a4b900e7e149496e1f4b57976e51',
309 '5ebeeebb320790caf276b9fc8b24546d63316533',
310 )
311
312 with pytest.raises(pygit2.GitError):
313 testrepo.descendant_of(
314 '2' * 40, # a valid but inexistent SHA
315 '5ebeeebb320790caf276b9fc8b24546d63316533',
316 )
317
318
319def test_ahead_behind(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…