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

Function test_add_recursively

test/test_packbuilder.py:53–65  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

51
52
53def test_add_recursively(testrepo: Repository) -> None:
54 # Add the head object and referenced objects recursively and confirm that the count is correct
55 packbuilder = PackBuilder(testrepo)
56 assert isinstance(testrepo.head.target, Oid)
57 packbuilder.add_recur(testrepo.head.target)
58
59 # expect a count of 4 made up of the following referenced objects:
60 # Commit
61 # Tree
62 # Blob: hello.txt
63 # Blob: .gitignore
64
65 assert len(packbuilder) == 4
66
67
68def test_repo_pack(testrepo: Repository, tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 2

add_recurMethod · 0.95
PackBuilderClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…