Test that array creation functions with like=x do not internally store the graph of x
(func)
| 1105 | "func", [da.array, da.asarray, da.asanyarray, da.arange, da.tri] |
| 1106 | ) |
| 1107 | def test_like_forgets_graph(func): |
| 1108 | """Test that array creation functions with like=x do not |
| 1109 | internally store the graph of x |
| 1110 | """ |
| 1111 | x = da.arange(3).map_blocks(lambda x: x) |
| 1112 | with pytest.raises(Exception, match="local object"): |
| 1113 | pickle.dumps(x) |
| 1114 | |
| 1115 | a = func(1, like=x) |
| 1116 | pickle.dumps(a) |
nothing calls this directly
no test coverage detected
searching dependent graphs…