(method)
| 953 | |
| 954 | @pytest.mark.parametrize("method", ["load", "compute"]) |
| 955 | def 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"]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…