(self)
| 6091 | assert_identical(original, actual) |
| 6092 | |
| 6093 | def test_open_mfdataset_with_warn(self) -> None: |
| 6094 | original = Dataset({"foo": ("x", np.random.randn(10))}) |
| 6095 | with pytest.warns(UserWarning, match=r"Ignoring."): |
| 6096 | with create_tmp_files(2) as (tmp1, tmp2): |
| 6097 | ds1 = original.isel(x=slice(5)) |
| 6098 | ds2 = original.isel(x=slice(5, 10)) |
| 6099 | ds1.to_netcdf(tmp1) |
| 6100 | ds2.to_netcdf(tmp2) |
| 6101 | with open_mfdataset( |
| 6102 | [tmp1, "non-existent-file.nc", tmp2], |
| 6103 | concat_dim="x", |
| 6104 | combine="nested", |
| 6105 | errors="warn", |
| 6106 | ) as actual: |
| 6107 | assert_identical(original, actual) |
| 6108 | |
| 6109 | def test_open_mfdataset_2d_with_ignore(self) -> None: |
| 6110 | original = Dataset({"foo": (["x", "y"], np.random.randn(10, 8))}) |
nothing calls this directly
no test coverage detected