(self)
| 2513 | assert actual.x.dtype == expected.x.dtype |
| 2514 | |
| 2515 | def test_reindex_with_multiindex_level(self) -> None: |
| 2516 | # test for https://github.com/pydata/xarray/issues/10347 |
| 2517 | mindex = pd.MultiIndex.from_product( |
| 2518 | [[100, 200, 300], [1, 2, 3, 4]], names=["x", "y"] |
| 2519 | ) |
| 2520 | y_idx = PandasIndex(mindex.levels[1], "y") |
| 2521 | |
| 2522 | ds1 = xr.Dataset(coords={"y": [1, 2, 3]}) |
| 2523 | ds2 = xr.Dataset(coords=xr.Coordinates.from_xindex(y_idx)) |
| 2524 | |
| 2525 | actual = ds1.reindex(y=ds2.y) |
| 2526 | assert_identical(actual, ds2) |
| 2527 | |
| 2528 | @pytest.mark.parametrize("fill_value", [dtypes.NA, 2, 2.0, {"foo": 2, "bar": 1}]) |
| 2529 | def test_align_fill_value(self, fill_value) -> None: |
nothing calls this directly
no test coverage detected