Skip to content

Commit

Permalink
Fix xarray's test suite with the dask master (#3235)
Browse files Browse the repository at this point in the history
We shouldn't be checking the details of dask's repr.
  • Loading branch information
shoyer authored Aug 20, 2019
1 parent 0a3bb18 commit 131f602
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions xarray/tests/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ def test_repr(self):
expected = dedent(
"""\
<xarray.Variable (x: 4, y: 6)>
dask.array<array, shape=(4, 6), dtype=float64, chunksize=(2, 2)>"""
{!r}""".format(
self.lazy_var.data
)
)
assert expected == repr(self.lazy_var)

Expand Down Expand Up @@ -499,10 +501,12 @@ def test_dataarray_repr_legacy(self):
expected = dedent(
"""\
<xarray.DataArray 'data' (x: 1)>
dask.array<data, shape=(1,), dtype=int64, chunksize=(1,)>
{!r}
Coordinates:
y (x) int64 dask.array<chunksize=(1,)>
Dimensions without coordinates: x"""
Dimensions without coordinates: x""".format(
data
)
)
assert expected == repr(a)
assert kernel_call_count == 0 # should not evaluate dask array
Expand All @@ -515,10 +519,12 @@ def test_dataarray_repr(self):
expected = dedent(
"""\
<xarray.DataArray 'data' (x: 1)>
dask.array<data, shape=(1,), dtype=int64, chunksize=(1,)>
{!r}
Coordinates:
y (x) int64 dask.array<chunksize=(1,), meta=np.ndarray>
Dimensions without coordinates: x"""
Dimensions without coordinates: x""".format(
data
)
)
assert expected == repr(a)
assert kernel_call_count == 0 # should not evaluate dask array
Expand Down

0 comments on commit 131f602

Please sign in to comment.