MCPcopy
hub / github.com/pydata/xarray / test_calendar_specific_month_end

Function test_calendar_specific_month_end

xarray/tests/test_cftime_offsets.py:1322–1335  ·  view source on GitHub ↗
(
    calendar: str, expected_month_day: list[tuple[int, int]]
)

Source from the content-addressed store, hash-verified

1320 ids=_id_func,
1321)
1322def test_calendar_specific_month_end(
1323 calendar: str, expected_month_day: list[tuple[int, int]]
1324) -> None:
1325 year = 2000 # Use a leap-year to highlight calendar differences
1326 date_type = get_date_type(calendar)
1327 expected = [date_type(year, *args) for args in expected_month_day]
1328 result = date_range(
1329 start="2000-02",
1330 end="2001",
1331 freq="2ME",
1332 calendar=calendar,
1333 use_cftime=True,
1334 ).values
1335 np.testing.assert_equal(result, expected)
1336
1337
1338@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

get_date_typeFunction · 0.90
date_rangeFunction · 0.90
date_typeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…