MCPcopy Index your code
hub / github.com/dask/dask / test_array_as_argument

Function test_array_as_argument

dask/tests/test_task_spec.py:437–445  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

435
436
437def test_array_as_argument():
438 np = pytest.importorskip("numpy")
439 t = Task("key-1", func, np.array([1, 2]), "b")
440 assert t() == "[1 2]-b"
441
442 # This will **not** work since we do not want to recurse into an array!
443 t2 = Task("key-2", func, np.array([1, t.ref()]), "b")
444 assert t2({"key-1": "foo"}) != "[1 foo]-b"
445 assert not _get_dependencies(np.array([1, t.ref()]))
446
447
448@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

TaskClass · 0.90
_get_dependenciesFunction · 0.90
refMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…