(self, func, dtype)
| 2775 | @pytest.mark.xfail(reason="ffill and bfill lose units in data") |
| 2776 | @pytest.mark.parametrize("func", (method("ffill"), method("bfill")), ids=repr) |
| 2777 | def test_missing_value_filling(self, func, dtype): |
| 2778 | array = ( |
| 2779 | create_nan_array([1.4, np.nan, 2.3, np.nan, np.nan, 9.1], dtype) |
| 2780 | * unit_registry.degK |
| 2781 | ) |
| 2782 | x = np.arange(len(array)) |
| 2783 | data_array = xr.DataArray(data=array, coords={"x": x}, dims="x") |
| 2784 | |
| 2785 | expected = attach_units( |
| 2786 | func(strip_units(data_array), dim="x"), extract_units(data_array) |
| 2787 | ) |
| 2788 | actual = func(data_array, dim="x") |
| 2789 | |
| 2790 | assert_units_equal(expected, actual) |
| 2791 | assert_identical(expected, actual) |
| 2792 | |
| 2793 | @pytest.mark.parametrize( |
| 2794 | "unit,error", |
nothing calls this directly
no test coverage detected