Skip to content

Commit b87bb35

Browse files
committed
Add 'D' to error tests for float multiplication
1 parent f897d20 commit b87bb35

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

xarray/tests/test_cftime_offsets.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,15 @@ def test_mul_float_multiple_next_higher_resolution():
471471

472472
@pytest.mark.parametrize(
473473
"offset",
474-
[YearBegin(), YearEnd(), QuarterBegin(), QuarterEnd(), MonthBegin(), MonthEnd()],
474+
[
475+
YearBegin(),
476+
YearEnd(),
477+
QuarterBegin(),
478+
QuarterEnd(),
479+
MonthBegin(),
480+
MonthEnd(),
481+
Day(),
482+
],
475483
ids=_id_func,
476484
)
477485
def test_nonTick_offset_multiplied_float_error(offset):

xarray/tests/test_cftimeindex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ def test_cftimeindex_shift_float_us() -> None:
855855

856856

857857
@requires_cftime
858-
@pytest.mark.parametrize("freq", ["YS", "YE", "QS", "QE", "MS", "ME"])
858+
@pytest.mark.parametrize("freq", ["YS", "YE", "QS", "QE", "MS", "ME", "D"])
859859
def test_cftimeindex_shift_float_fails_for_non_tick_freqs(freq) -> None:
860860
a = xr.date_range("2000", periods=3, freq="D", use_cftime=True)
861861
with pytest.raises(TypeError, match="unsupported operand type"):

0 commit comments

Comments
 (0)