Skip to content

Commit

Permalink
fix failure on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
shoyer committed Sep 10, 2024
1 parent 83f524b commit 3b42219
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/datatree.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Datatree:
def setup(self):
run1 = DataTree.from_dict({"run1": xr.Dataset({"a": 1})})
self.d_few = {"run1": run1}
self.d_many = {f"run{i}": run1.copy() for i in range(100)}
self.d_many = {f"run{i}": xr.Dataset({"a": 1}) for i in range(100)}

def time_from_dict_few(self):
DataTree.from_dict(self.d_few)
Expand Down
14 changes: 7 additions & 7 deletions xarray/tests/test_datatree.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,9 @@ def test_repr(self):
def test_repr2(self):
tree = DataTree.from_dict(
{
"/": Dataset(coords={"x": [1]}),
"/": Dataset(coords={"x": [1.0]}),
"/first_child": None,
"/second_child": Dataset({"foo": ("x", [0])}),
"/second_child": Dataset({"foo": ("x", [0.0])}),
}
)

Expand All @@ -848,12 +848,12 @@ def test_repr2(self):
Group: /
│ Dimensions: (x: 1)
│ Coordinates:
│ * x (x) int64 8B 1
│ * x (x) float64 8B 1.0
├── Group: /first_child
└── Group: /second_child
Dimensions: (x: 1)
Data variables:
foo (x) int64 8B 0
foo (x) float64 8B 0.0
"""
).strip()
assert result == expected
Expand All @@ -865,7 +865,7 @@ def test_repr2(self):
Group: /first_child
Dimensions: (x: 1)
Inherited coordinates:
* x (x) int64 8B 1
* x (x) float64 8B 1.0
"""
).strip()
assert result == expected
Expand All @@ -877,9 +877,9 @@ def test_repr2(self):
Group: /second_child
Dimensions: (x: 1)
Inherited coordinates:
* x (x) int64 8B 1
* x (x) float64 8B 1.0
Data variables:
foo (x) int64 8B 0
foo (x) float64 8B 0.0
"""
).strip()
assert result == expected
Expand Down

0 comments on commit 3b42219

Please sign in to comment.