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

Function test_iterate_tree

test/test_tree.py:176–186  ·  view source on GitHub ↗

Testing that we're able to iterate of a Tree object and that the resulting sha strings are consistent with the sha strings we could get with other Tree access methods.

(barerepo: Repository)

Source from the content-addressed store, hash-verified

174
175
176def test_iterate_tree(barerepo: Repository) -> None:
177 """
178 Testing that we're able to iterate of a Tree object and that the
179 resulting sha strings are consistent with the sha strings we could
180 get with other Tree access methods.
181 """
182 tree = barerepo[TREE_SHA]
183 assert isinstance(tree, Tree)
184 for tree_entry in tree:
185 assert tree_entry.name is not None
186 assert tree_entry == tree[tree_entry.name]
187
188
189def test_iterate_tree_nested(barerepo: 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…