MCPcopy Index your code
hub / github.com/pydata/xarray / create_test_tree

Function create_test_tree

xarray/tests/test_treenode.py:278–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

276
277
278def create_test_tree() -> tuple[NamedNode, NamedNode]:
279 # a
280 # ├── b
281 # │ ├── d
282 # │ └── e
283 # │ ├── f
284 # │ └── g
285 # └── c
286 # └── h
287 # └── i
288 a: NamedNode = NamedNode(name="a")
289 b: NamedNode = NamedNode()
290 c: NamedNode = NamedNode()
291 d: NamedNode = NamedNode()
292 e: NamedNode = NamedNode()
293 f: NamedNode = NamedNode()
294 g: NamedNode = NamedNode()
295 h: NamedNode = NamedNode()
296 i: NamedNode = NamedNode()
297
298 a.children = {"b": b, "c": c}
299 b.children = {"d": d, "e": e}
300 e.children = {"f": f, "g": g}
301 c.children = {"h": h}
302 h.children = {"i": i}
303
304 return a, f
305
306
307class TestGroupSubtrees:

Callers 9

test_one_treeMethod · 0.85
test_parentsMethod · 0.85
test_lineageMethod · 0.85
test_ancestorsMethod · 0.85
test_subtreeMethod · 0.85
test_descendantsMethod · 0.85
test_leavesMethod · 0.85
test_levelsMethod · 0.85

Calls 1

NamedNodeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…