Skip to content

Commit

Permalink
mypy again
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Sep 16, 2024
1 parent 6456276 commit 6b894f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xarray/tests/test_treenode.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ def test_names(self):
nn: NamedNode = NamedNode()
assert nn.name is None

nn: NamedNode = NamedNode(name="foo")
nn = NamedNode(name="foo")
assert nn.name == "foo"

nn.name = "bar"
assert nn.name == "bar"

nn: NamedNode = NamedNode(children={"foo": NamedNode()})
nn = NamedNode(children={"foo": NamedNode()})
assert nn.children["foo"].name == "foo"
with pytest.raises(
ValueError, match="cannot set the name of a node which already has a parent"
Expand Down

0 comments on commit 6b894f1

Please sign in to comment.