MCPcopy
hub / github.com/pydata/xarray / test_to_netcdf

Method test_to_netcdf

xarray/tests/test_backends_datatree.py:210–217  ·  view source on GitHub ↗
(self, tmpdir, simple_datatree)

Source from the content-addressed store, hash-verified

208 engine: T_DataTreeNetcdfEngine | None
209
210 def test_to_netcdf(self, tmpdir, simple_datatree):
211 filepath = tmpdir / "test.nc"
212 original_dt = simple_datatree
213 original_dt.to_netcdf(filepath, engine=self.engine)
214
215 with open_datatree(filepath, engine=self.engine) as roundtrip_dt:
216 assert roundtrip_dt._close is not None
217 assert_equal(original_dt, roundtrip_dt)
218
219 def test_decode_cf(self, tmpdir):
220 filepath = tmpdir / "test-cf-convention.nc"

Callers

nothing calls this directly

Calls 3

open_datatreeFunction · 0.90
assert_equalFunction · 0.90
to_netcdfMethod · 0.45

Tested by

no test coverage detected