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

Method test_load_dataset

xarray/tests/test_backends.py:6508–6515  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6506 assert_identical(actual, original)
6507
6508 def test_load_dataset(self) -> None:
6509 with create_tmp_file() as tmp:
6510 original = Dataset({"foo": ("x", np.random.randn(10))})
6511 original.to_netcdf(tmp)
6512 ds = load_dataset(tmp)
6513 assert_identical(original, ds)
6514 # this would fail if we used open_dataset instead of load_dataset
6515 ds.to_netcdf(tmp)
6516
6517 def test_load_dataarray(self) -> None:
6518 with create_tmp_file() as tmp:

Callers

nothing calls this directly

Calls 5

to_netcdfMethod · 0.95
DatasetClass · 0.90
load_datasetFunction · 0.90
assert_identicalFunction · 0.90
create_tmp_fileFunction · 0.85

Tested by

no test coverage detected