MCPcopy Create free account
hub / github.com/dask/dask / test_asarray_xarray_intersphinx_workaround

Function test_asarray_xarray_intersphinx_workaround

dask/array/tests/test_xarray.py:36–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def test_asarray_xarray_intersphinx_workaround():
37 # test that the intersphinx workaround in https://github.com/pydata/xarray/issues/4279 works
38 module = xr.DataArray.__module__
39 try:
40 xr.DataArray.__module__ = "xarray"
41 y = da.asarray(xr.DataArray([1, 2, 3.0]))
42 assert isinstance(y, da.Array)
43 assert type(y._meta).__name__ == "ndarray"
44 assert_eq(y, y)
45 finally:
46 xr.DataArray.__module__ = module
47
48
49def test_fft():

Callers

nothing calls this directly

Calls 1

assert_eqFunction · 0.90

Tested by

no test coverage detected