We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ce150d commit c955b00Copy full SHA for c955b00
pandas/tests/tslibs/test_timedeltas.py
@@ -8,6 +8,7 @@
8
offsets,
9
)
10
11
+from pandas.errors import OutOfBoundsTimedelta
12
13
@pytest.mark.parametrize(
14
"obj,expected",
@@ -37,3 +38,8 @@ def test_huge_nanoseconds_overflow():
37
38
# GH 32402
39
assert delta_to_nanoseconds(Timedelta(1e10)) == 1e10
40
assert delta_to_nanoseconds(Timedelta(nanoseconds=1e10)) == 1e10
41
+
42
+def test_out_of_bounds():
43
+ # GH 36615
44
+ with pytest.raises(OutOfBoundsTimedelta, match="200000 days"):
45
+ Timedelta(np.timedelta64(200000,"D"))
0 commit comments