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

Method test_open_and_do_math

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

Source from the content-addressed store, hash-verified

6347 )
6348
6349 def test_open_and_do_math(self) -> None:
6350 original = Dataset({"foo": ("x", np.random.randn(10))})
6351 with create_tmp_file() as tmp:
6352 original.to_netcdf(tmp)
6353 with open_mfdataset(tmp, combine="by_coords") as ds:
6354 actual = 1.0 * ds
6355 assert_allclose(original, actual, decode_bytes=False)
6356
6357 @pytest.mark.parametrize(
6358 "kwargs",

Callers

nothing calls this directly

Calls 5

to_netcdfMethod · 0.95
DatasetClass · 0.90
open_mfdatasetFunction · 0.90
assert_allcloseFunction · 0.90
create_tmp_fileFunction · 0.85

Tested by

no test coverage detected