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

Function test_h5netcdf_storage_options

xarray/tests/test_backends.py:8239–8256  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8237@requires_h5netcdf
8238@requires_fsspec
8239def test_h5netcdf_storage_options() -> None:
8240 with create_tmp_files(2, allow_cleanup_failure=ON_WINDOWS) as (f1, f2):
8241 ds1 = create_test_data()
8242 ds1.to_netcdf(f1, engine="h5netcdf")
8243
8244 ds2 = create_test_data()
8245 ds2.to_netcdf(f2, engine="h5netcdf")
8246
8247 files = [f"file://{f}" for f in [f1, f2]]
8248 with xr.open_mfdataset(
8249 files,
8250 engine="h5netcdf",
8251 concat_dim="time",
8252 data_vars="all",
8253 combine="nested",
8254 storage_options={"skip_instance_cache": False},
8255 ) as ds:
8256 assert_identical(xr.concat([ds1, ds2], dim="time", data_vars="all"), ds)

Callers

nothing calls this directly

Calls 5

assert_identicalFunction · 0.90
create_tmp_filesFunction · 0.85
create_test_dataFunction · 0.85
to_netcdfMethod · 0.45
concatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…