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

Function test_cftimeindex_shift_float

xarray/tests/test_cftimeindex.py:841–846  ·  view source on GitHub ↗
(n, freq, units, calendar)

Source from the content-addressed store, hash-verified

839)
840@pytest.mark.parametrize("calendar", _CFTIME_CALENDARS)
841def test_cftimeindex_shift_float(n, freq, units, calendar) -> None:
842 a = xr.date_range("2000", periods=3, calendar=calendar, freq="D", use_cftime=True)
843 result = a + pd.Timedelta(n, units)
844 expected = a.shift(n, freq)
845 assert result.equals(expected)
846 assert isinstance(result, CFTimeIndex)
847
848
849@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…