(self)
| 3338 | ) |
| 3339 | |
| 3340 | def test_append_with_new_variable(self) -> None: |
| 3341 | ds, ds_to_append, ds_with_new_var = create_append_test_data() |
| 3342 | |
| 3343 | # check append mode for new variable |
| 3344 | with self.create_zarr_target() as store_target: |
| 3345 | combined = xr.concat([ds, ds_to_append], dim="time") |
| 3346 | combined.to_zarr(store_target, mode="w", **self.version_kwargs) |
| 3347 | assert_identical( |
| 3348 | combined, |
| 3349 | xr.open_dataset(store_target, engine="zarr", **self.version_kwargs), |
| 3350 | ) |
| 3351 | ds_with_new_var.to_zarr(store_target, mode="a", **self.version_kwargs) |
| 3352 | combined = xr.concat([ds, ds_to_append], dim="time") |
| 3353 | combined["new_var"] = ds_with_new_var["new_var"] |
| 3354 | assert_identical( |
| 3355 | combined, |
| 3356 | xr.open_dataset(store_target, engine="zarr", **self.version_kwargs), |
| 3357 | ) |
| 3358 | |
| 3359 | def test_append_with_append_dim_no_overwrite(self) -> None: |
| 3360 | ds, ds_to_append, _ = create_append_test_data() |
nothing calls this directly
no test coverage detected