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

Function test_lazy_decode_timedelta_error

xarray/tests/test_coding_times.py:1965–1973  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1963
1964
1965def test_lazy_decode_timedelta_error() -> None:
1966 attrs = {"units": "seconds"}
1967 encoded = Variable(["time"], [0, np.iinfo(np.int64).max, 1], attrs=attrs)
1968 decode_timedelta = CFTimedeltaCoder(decode_via_units=True, time_unit="ms")
1969 decoded = conventions.decode_cf_variable(
1970 "foo", encoded, decode_timedelta=decode_timedelta
1971 )
1972 with pytest.raises(OutOfBoundsTimedelta, match="overflow"):
1973 decoded.load()
1974
1975
1976@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

VariableClass · 0.90
CFTimedeltaCoderClass · 0.85
loadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…