diff --git a/xarray/tests/test_indexing.py b/xarray/tests/test_indexing.py index 4bf05471d71..78a63cb380c 100644 --- a/xarray/tests/test_indexing.py +++ b/xarray/tests/test_indexing.py @@ -912,6 +912,12 @@ def __array_function__(self, func, types, args, kwargs): pass +def as_dask_array(arr, chunks): + import dask.array as da + + return da.from_array(arr, chunks=chunks) + + @pytest.mark.parametrize( ["array", "expected_type"], ( @@ -926,6 +932,12 @@ def __array_function__(self, func, types, args, kwargs): pytest.param( pd.Index([1, 2]), indexing.PandasIndexingAdapter, id="pandas.Index" ), + pytest.param( + as_dask_array(np.array([1, 2]), chunks=(1,)), + indexing.DaskIndexingAdapter, + id="dask.array", + marks=requires_dask, + ), pytest.param( ArrayWithNamespace(), indexing.ArrayApiIndexingAdapter, id="array_api" ),