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

Method test_disown_child

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

Source from the content-addressed store, hash-verified

89 assert kate.parent is john
90
91 def test_disown_child(self) -> None:
92 john: TreeNode = TreeNode(children={"Mary": TreeNode()})
93 mary = john.children["Mary"]
94 mary.orphan()
95 assert mary.parent is None
96 assert "Mary" not in john.children
97
98 def test_doppelganger_child(self) -> None:
99 kate: TreeNode = TreeNode()

Callers

nothing calls this directly

Calls 2

TreeNodeClass · 0.90
orphanMethod · 0.80

Tested by

no test coverage detected