MCPcopy Index your code
hub / github.com/pydata/xarray / test_timedeltaindex_add_cftimeindex

Function test_timedeltaindex_add_cftimeindex

xarray/tests/test_cftimeindex.py:883–889  ·  view source on GitHub ↗
(calendar)

Source from the content-addressed store, hash-verified

881@requires_cftime
882@pytest.mark.parametrize("calendar", _CFTIME_CALENDARS)
883def test_timedeltaindex_add_cftimeindex(calendar) -> None:
884 a = xr.date_range("2000", periods=5, calendar=calendar, use_cftime=True)
885 deltas = pd.TimedeltaIndex([timedelta(days=2) for _ in range(5)])
886 result = deltas + a
887 expected = a.shift(2, "D")
888 assert result.equals(expected)
889 assert isinstance(result, CFTimeIndex)
890
891
892@requires_cftime

Callers

nothing calls this directly

Calls 2

shiftMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…