MCPcopy Index your code
hub / github.com/pydata/xarray / test_dataset_repr

Method test_dataset_repr

xarray/tests/test_dask.py:711–726  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

709 assert kernel_call_count == 0 # should not evaluate dask array
710
711 def test_dataset_repr(self):
712 data = build_dask_array("data")
713 nonindex_coord = build_dask_array("coord")
714 ds = Dataset(data_vars={"a": ("x", data)}, coords={"y": ("x", nonindex_coord)})
715 expected = dedent(
716 """\
717 <xarray.Dataset> Size: 16B
718 Dimensions: (x: 1)
719 Coordinates:
720 y (x) int64 8B dask.array<chunksize=(1,), meta=np.ndarray>
721 Dimensions without coordinates: x
722 Data variables:
723 a (x) int64 8B dask.array<chunksize=(1,), meta=np.ndarray>"""
724 )
725 assert expected == repr(ds)
726 assert kernel_call_count == 0 # should not evaluate dask array
727
728 def test_dataarray_pickle(self):
729 # Test that pickling/unpickling converts the dask backend

Callers

nothing calls this directly

Calls 2

DatasetClass · 0.90
build_dask_arrayFunction · 0.85

Tested by

no test coverage detected