We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b74d4ed commit adfd243Copy full SHA for adfd243
tests/unit/xarray/test_to_xarray.py
@@ -12,9 +12,9 @@
12
import dask.array as da
13
import numpy as np
14
import pytest
15
+
16
from ncdata import NcData, NcDimension, NcVariable
17
from ncdata.xarray import to_xarray
-
18
from tests import MonitoredArray
19
20
@@ -61,7 +61,10 @@ def test_real_nocopy():
61
62
# Check that the data content is the *SAME ARRAY*
63
xr_data = xrds.variables["var_x"]._data
64
- assert xr_data is real_numpy_data
+ # There may be a wrapper object, for some versions of xarray,
65
+ # so test by modifying the original + check that the result tracks it.
66
+ real_numpy_data[-1] = 777
67
+ assert np.all(xr_data == real_numpy_data)
68
69
70
@pytest.mark.parametrize("scaleandoffset", ["WITHscaling", "NOscaling"])
0 commit comments