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

Method setup_and_verify_store

xarray/tests/test_backends.py:3578–3583  ·  view source on GitHub ↗
(expected=data)

Source from the content-addressed store, hash-verified

3576
3577 @contextlib.contextmanager
3578 def setup_and_verify_store(expected=data):
3579 with self.create_zarr_target() as store:
3580 data.to_zarr(store, **self.version_kwargs)
3581 yield store
3582 with self.open(store) as actual:
3583 assert_identical(actual, expected)
3584
3585 # verify the base case works
3586 expected = Dataset({"u": (("x",), np.array([10, 11, 2, 3, 4]))})

Callers

nothing calls this directly

Calls 4

create_zarr_targetMethod · 0.95
openMethod · 0.95
assert_identicalFunction · 0.90
to_zarrMethod · 0.45

Tested by

no test coverage detected