MCPcopy
hub / github.com/pandas-dev/pandas / test_catch_oob

Function test_catch_oob

pandas/tests/test_errors.py:68–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66
67
68def test_catch_oob():
69 from pandas import errors
70
71 msg = "Cannot cast 1500-01-01 00:00:00 to unit='ns' without overflow"
72 with pytest.raises(errors.OutOfBoundsDatetime, match=msg):
73 pd.Timestamp("15000101").as_unit("ns")
74
75
76@pytest.mark.parametrize("is_local", [True, False])

Callers

nothing calls this directly

Calls 2

raisesMethod · 0.45
as_unitMethod · 0.45

Tested by

no test coverage detected