MCPcopy Index your code
hub / github.com/pydata/xarray / test_dask_kwargs_variable

Function test_dask_kwargs_variable

xarray/tests/test_dask.py:955–961  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

953
954@pytest.mark.parametrize("method", ["load", "compute"])
955def test_dask_kwargs_variable(method):
956 chunked_array = da.from_array(np.arange(3), chunks=(2,))
957 x = Variable("y", chunked_array)
958 # args should be passed on to dask.compute() (via DaskManager.compute())
959 with mock.patch.object(da, "compute", return_value=(np.arange(3),)) as mock_compute:
960 getattr(x, method)(foo="bar")
961 mock_compute.assert_called_with(chunked_array, foo="bar")
962
963
964@pytest.mark.parametrize("method", ["load", "compute", "persist"])

Callers

nothing calls this directly

Calls 3

VariableClass · 0.90
arangeMethod · 0.80
from_arrayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…