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

Method test_set_child_node

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

Source from the content-addressed store, hash-verified

196
197class TestSetNodes:
198 def test_set_child_node(self) -> None:
199 john: TreeNode = TreeNode()
200 mary: TreeNode = TreeNode()
201 john._set_item("Mary", mary)
202
203 assert john.children["Mary"] is mary
204 assert isinstance(mary, TreeNode)
205 assert mary.children == {}
206 assert mary.parent is john
207
208 def test_child_already_exists(self) -> None:
209 mary: TreeNode = TreeNode()

Callers

nothing calls this directly

Calls 2

_set_itemMethod · 0.95
TreeNodeClass · 0.90

Tested by

no test coverage detected