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

Function test_cf_timedelta_roundtrip_large_value

xarray/tests/test_coding_times.py:663–668  ·  view source on GitHub ↗
(time_unit: PDDatetimeUnitOptions)

Source from the content-addressed store, hash-verified

661
662
663def test_cf_timedelta_roundtrip_large_value(time_unit: PDDatetimeUnitOptions) -> None:
664 value = np.timedelta64(np.iinfo(np.int64).max, time_unit)
665 encoded, units = encode_cf_timedelta(value)
666 decoded = decode_cf_timedelta(encoded, units, time_unit=time_unit)
667 assert value == decoded
668 assert value.dtype == decoded.dtype
669
670
671@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

encode_cf_timedeltaFunction · 0.90
decode_cf_timedeltaFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…