(c, s, a, b)
| 286 | |
| 287 | @gen_cluster(client=True) |
| 288 | async def test_async(c, s, a, b) -> None: |
| 289 | x = create_test_data() |
| 290 | assert not dask.is_dask_collection(x) |
| 291 | y = x.chunk({"dim2": 4}) + 10 |
| 292 | assert dask.is_dask_collection(y) |
| 293 | assert dask.is_dask_collection(y.var1) |
| 294 | assert dask.is_dask_collection(y.var2) |
| 295 | |
| 296 | z = c.persist(y) |
| 297 | assert str(z) |
| 298 | |
| 299 | assert dask.is_dask_collection(z) |
| 300 | assert dask.is_dask_collection(z.var1) |
| 301 | assert dask.is_dask_collection(z.var2) |
| 302 | assert len(y.__dask_graph__()) > len(z.__dask_graph__()) |
| 303 | |
| 304 | assert not futures_of(y) |
| 305 | assert futures_of(z) |
| 306 | |
| 307 | future = c.compute(z) |
| 308 | w = await future |
| 309 | assert not dask.is_dask_collection(w) |
| 310 | assert_allclose(x + 10, w) |
| 311 | |
| 312 | assert s.tasks |
| 313 | |
| 314 | |
| 315 | def test_hdf5_lock() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…