(offset: str | int)
| 279 | |
| 280 | @pytest.mark.parametrize("offset", ["foo", "5MS", 10]) |
| 281 | def test_invalid_offset_error(offset: str | int) -> None: |
| 282 | cftime_index = xr.date_range("2000", periods=5, use_cftime=True) |
| 283 | da_cftime = da(cftime_index) |
| 284 | with pytest.raises(ValueError, match="offset must be"): |
| 285 | da_cftime.resample(time="2h", offset=offset) # type: ignore[arg-type] |
| 286 | |
| 287 | |
| 288 | def test_timedelta_offset() -> None: |