MCPcopy Create free account
hub / github.com/pydata/xarray / test_save_emptydim

Method test_save_emptydim

xarray/tests/test_backends.py:3444–3451  ·  view source on GitHub ↗
(self, chunk)

Source from the content-addressed store, hash-verified

3442
3443 @pytest.mark.parametrize("chunk", [False, True])
3444 def test_save_emptydim(self, chunk) -> None:
3445 if chunk and not has_dask:
3446 pytest.skip("requires dask")
3447 ds = Dataset({"x": (("a", "b"), np.empty((5, 0))), "y": ("a", [1, 2, 5, 8, 9])})
3448 if chunk:
3449 ds = ds.chunk({}) # chunk dataset to save dask array
3450 with self.roundtrip(ds) as ds_reload:
3451 assert_identical(ds, ds_reload)
3452
3453 @requires_dask
3454 def test_no_warning_from_open_emptydim_with_chunks(self) -> None:

Callers

nothing calls this directly

Calls 5

chunkMethod · 0.95
roundtripMethod · 0.95
DatasetClass · 0.90
assert_identicalFunction · 0.90
emptyMethod · 0.80

Tested by

no test coverage detected