Test that all layers of the original collection exist in the cloned collection too and that Blockwise layers have not been materialized
(cloned, orig)
| 63 | |
| 64 | |
| 65 | def assert_did_not_materialize(cloned, orig): |
| 66 | """Test that all layers of the original collection exist in the cloned collection |
| 67 | too and that Blockwise layers have not been materialized |
| 68 | """ |
| 69 | olayers = orig.__dask_graph__().layers |
| 70 | clayers = cloned.__dask_graph__().layers |
| 71 | for k, v in olayers.items(): |
| 72 | try: |
| 73 | cv = clayers[k] |
| 74 | except KeyError: |
| 75 | cv = clayers[clone_key(k, 0)] |
| 76 | if isinstance(v, Blockwise): |
| 77 | assert not v.is_materialized() |
| 78 | assert not cv.is_materialized() |
| 79 | |
| 80 | |
| 81 | # Generic valid keys |
nothing calls this directly
no test coverage detected