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

Method test_open_mfdataset_concat_dim

xarray/tests/test_backends.py:6361–6371  ·  view source on GitHub ↗
(self, kwargs)

Source from the content-addressed store, hash-verified

6359 [pytest.param({"concat_dim": None}, id="none"), pytest.param({}, id="default")],
6360 )
6361 def test_open_mfdataset_concat_dim(self, kwargs) -> None:
6362 with set_options(use_new_combine_kwarg_defaults=True):
6363 with create_tmp_file() as tmp1:
6364 with create_tmp_file() as tmp2:
6365 data = Dataset({"x": 0})
6366 data.to_netcdf(tmp1)
6367 Dataset({"x": np.nan}).to_netcdf(tmp2)
6368 with open_mfdataset(
6369 [tmp1, tmp2], **kwargs, combine="nested"
6370 ) as actual:
6371 assert_identical(data, actual)
6372
6373 def test_open_dataset(self) -> None:
6374 original = Dataset({"foo": ("x", np.random.randn(10))})

Callers

nothing calls this directly

Calls 6

to_netcdfMethod · 0.95
set_optionsClass · 0.90
DatasetClass · 0.90
open_mfdatasetFunction · 0.90
assert_identicalFunction · 0.90
create_tmp_fileFunction · 0.85

Tested by

no test coverage detected