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

Method roundtrip

xarray/tests/test_conventions.py:592–601  ·  view source on GitHub ↗
(
        self, data, save_kwargs=None, open_kwargs=None, allow_cleanup_failure=False
    )

Source from the content-addressed store, hash-verified

590
591 @contextlib.contextmanager
592 def roundtrip(
593 self, data, save_kwargs=None, open_kwargs=None, allow_cleanup_failure=False
594 ):
595 if save_kwargs is None:
596 save_kwargs = {}
597 if open_kwargs is None:
598 open_kwargs = {}
599 store = CFEncodedInMemoryStore()
600 data.dump_to_store(store, **save_kwargs)
601 yield open_dataset(store, **open_kwargs)
602
603 @pytest.mark.skip("cannot roundtrip coordinates yet for CFEncodedInMemoryStore")
604 def test_roundtrip_coordinates(self) -> None:

Callers

nothing calls this directly

Calls 3

open_datasetFunction · 0.90
dump_to_storeMethod · 0.80

Tested by

no test coverage detected