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

Method test_open_netcdf3

xarray/tests/test_backends_datatree.py:386–393  ·  view source on GitHub ↗
(self, tmpdir)

Source from the content-addressed store, hash-verified

384
385 @requires_netCDF4
386 def test_open_netcdf3(self, tmpdir) -> None:
387 filepath = tmpdir / "test.nc"
388 ds = xr.Dataset({"foo": 1})
389 ds.to_netcdf(filepath, format="NETCDF3_CLASSIC")
390
391 expected_dt = DataTree(ds)
392 roundtrip_dt = load_datatree(filepath) # must use netCDF4 engine
393 assert_equal(expected_dt, roundtrip_dt)
394
395 @requires_h5netcdf
396 @requires_netCDF4

Callers

nothing calls this directly

Calls 4

to_netcdfMethod · 0.95
DataTreeClass · 0.90
load_datatreeFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected