File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 7
7
import numpy as np
8
8
import pandas as pd
9
9
import pytest
10
+ from packaging .version import Version
10
11
11
12
import xarray as xr
12
13
import xarray .ufuncs as xu
@@ -719,13 +720,17 @@ def test_sparse_dask_dataset_repr(self):
719
720
ds = xr .Dataset (
720
721
data_vars = {"a" : ("x" , sparse .COO .from_numpy (np .ones (4 )))}
721
722
).chunk ()
723
+ if Version (sparse .__version__ ) >= Version ("0.16.0" ):
724
+ meta = "sparse.numba_backend._coo.core.COO"
725
+ else :
726
+ meta = "sparse.COO"
722
727
expected = dedent (
723
- """\
728
+ f """\
724
729
<xarray.Dataset> Size: 32B
725
730
Dimensions: (x: 4)
726
731
Dimensions without coordinates: x
727
732
Data variables:
728
- a (x) float64 32B dask.array<chunksize=(4,), meta=sparse.COO >"""
733
+ a (x) float64 32B dask.array<chunksize=(4,), meta={ meta } >"""
729
734
)
730
735
assert expected == repr (ds )
731
736
You can’t perform that action at this time.
0 commit comments