MCPcopy
hub / github.com/pydata/xarray / roundtrip

Method roundtrip

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

Source from the content-addressed store, hash-verified

459
460 @contextlib.contextmanager
461 def roundtrip(
462 self, data, save_kwargs=None, open_kwargs=None, allow_cleanup_failure=False
463 ):
464 if save_kwargs is None:
465 save_kwargs = {}
466 if open_kwargs is None:
467 open_kwargs = {}
468
469 with create_tmp_file(allow_cleanup_failure=allow_cleanup_failure) as path:
470 self.save(data, path, **save_kwargs)
471 with self.open(path, **open_kwargs) as ds:
472 yield ds
473
474 @contextlib.contextmanager
475 def roundtrip_append(

Callers 15

assert_loadsMethod · 0.95
test_loadMethod · 0.95
test_load_asyncMethod · 0.95
test_dataset_computeMethod · 0.95
test_pickleMethod · 0.95
test_pickle_dataarrayMethod · 0.95
test_dataset_cachingMethod · 0.95

Calls 3

saveMethod · 0.95
openMethod · 0.95
create_tmp_fileFunction · 0.85

Tested by

no test coverage detected