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

Function test_infer_datetime_units

xarray/tests/test_coding_times.py:534–537  ·  view source on GitHub ↗
(freq, units)

Source from the content-addressed store, hash-verified

532
533@pytest.mark.parametrize(("freq", "units"), FREQUENCIES_TO_ENCODING_UNITS.items())
534def test_infer_datetime_units(freq, units) -> None:
535 dates = pd.date_range("2000", periods=2, freq=freq)
536 expected = f"{units} since 2000-01-01 00:00:00"
537 assert expected == infer_datetime_units(dates)
538
539
540@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

infer_datetime_unitsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…