(self, tmpdir)
| 217 | assert_equal(original_dt, roundtrip_dt) |
| 218 | |
| 219 | def test_decode_cf(self, tmpdir): |
| 220 | filepath = tmpdir / "test-cf-convention.nc" |
| 221 | original_dt = xr.DataTree( |
| 222 | xr.Dataset( |
| 223 | { |
| 224 | "test": xr.DataArray( |
| 225 | data=np.array([0, 1, 2], dtype=np.uint16), |
| 226 | attrs={"_FillValue": 99}, |
| 227 | ), |
| 228 | } |
| 229 | ) |
| 230 | ) |
| 231 | original_dt.to_netcdf(filepath, engine=self.engine) |
| 232 | with open_datatree( |
| 233 | filepath, engine=self.engine, decode_cf=False |
| 234 | ) as roundtrip_dt: |
| 235 | assert original_dt["test"].dtype == roundtrip_dt["test"].dtype |
| 236 | |
| 237 | def test_to_netcdf_inherited_coords(self, tmpdir) -> None: |
| 238 | filepath = tmpdir / "test.nc" |
nothing calls this directly
no test coverage detected