(self)
| 744 | assert not a2.coords["y"]._in_memory |
| 745 | |
| 746 | def test_dataset_pickle(self): |
| 747 | # Test that pickling/unpickling converts the dask backend |
| 748 | # to numpy in neither the data variables nor the non-index coords |
| 749 | data = build_dask_array("data") |
| 750 | nonindex_coord = build_dask_array("coord") |
| 751 | ds1 = Dataset(data_vars={"a": ("x", data)}, coords={"y": ("x", nonindex_coord)}) |
| 752 | ds1.compute() |
| 753 | assert not ds1["a"]._in_memory |
| 754 | assert not ds1["y"]._in_memory |
| 755 | assert kernel_call_count == 2 |
| 756 | ds2 = pickle.loads(pickle.dumps(ds1)) |
| 757 | assert kernel_call_count == 2 |
| 758 | assert_identical(ds1, ds2) |
| 759 | assert not ds1["a"]._in_memory |
| 760 | assert not ds2["a"]._in_memory |
| 761 | assert not ds1["y"]._in_memory |
| 762 | assert not ds2["y"]._in_memory |
| 763 | |
| 764 | def test_dataarray_getattr(self): |
| 765 | # ipython/jupyter does a long list of getattr() calls to when trying to |
nothing calls this directly
no test coverage detected