()
| 435 | |
| 436 | |
| 437 | def 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( |
nothing calls this directly
no test coverage detected
searching dependent graphs…