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

Method test_parenting

xarray/tests/test_treenode.py:23–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 assert root.children == {}
22
23 def test_parenting(self) -> None:
24 john: TreeNode = TreeNode()
25 mary: TreeNode = TreeNode()
26 mary._set_parent(john, "Mary")
27
28 assert mary.parent == john
29 assert john.children["Mary"] is mary
30
31 def test_no_time_traveller_loops(self) -> None:
32 john: TreeNode = TreeNode()

Callers

nothing calls this directly

Calls 2

_set_parentMethod · 0.95
TreeNodeClass · 0.90

Tested by

no test coverage detected