Skip to content

Commit 1065f4c

Browse files
committed
Update unit test after pydata#1522
1 parent fcc96c9 commit 1065f4c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

xarray/tests/test_dask.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,12 @@ def test_concat_loads_coords(self):
253253
# Test that concat() computes dask-based, non-index
254254
# coordinates exactly once and loads them in the output,
255255
# while leaving the input unaltered.
256-
y = build_dask_array()
256+
y = build_dask_array('y')
257257
ds1 = Dataset(coords={'x': [1], 'y': ('x', y)})
258258
ds2 = Dataset(coords={'x': [1], 'y': ('x', [2.0])})
259259
assert kernel_call_count == 0
260260
ds3 = xr.concat([ds1, ds2], dim='z')
261-
# BUG fixed in #1532 where getattr('to_dataset')
262-
# will cause non-index coords to be computed.
263-
assert kernel_call_count == 2
261+
assert kernel_call_count == 1
264262
assert ds1['y'].data is y
265263
assert isinstance(ds3['y'].data, np.ndarray)
266264
assert ds3['y'].values.tolist() == [[1.0], [2.0]]

0 commit comments

Comments
 (0)