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

Method test_child_already_exists

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

Source from the content-addressed store, hash-verified

206 assert mary.parent is john
207
208 def test_child_already_exists(self) -> None:
209 mary: TreeNode = TreeNode()
210 john: TreeNode = TreeNode(children={"Mary": mary})
211 mary_2: TreeNode = TreeNode()
212 with pytest.raises(KeyError):
213 john._set_item("Mary", mary_2, allow_overwrite=False)
214
215 def test_set_grandchild(self) -> None:
216 rose: TreeNode = TreeNode()

Callers

nothing calls this directly

Calls 2

_set_itemMethod · 0.95
TreeNodeClass · 0.90

Tested by

no test coverage detected