Skip to content

Commit c955b00

Browse files
author
Joeperdefloep
committed
BUG: added test pandas-dev#36615
1 parent 3ce150d commit c955b00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/tslibs/test_timedeltas.py

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
offsets,
99
)
1010

11+
from pandas.errors import OutOfBoundsTimedelta
1112

1213
@pytest.mark.parametrize(
1314
"obj,expected",
@@ -37,3 +38,8 @@ def test_huge_nanoseconds_overflow():
3738
# GH 32402
3839
assert delta_to_nanoseconds(Timedelta(1e10)) == 1e10
3940
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

Comments
 (0)