Skip to content

Commit 7bbe4a5

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

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/tslibs/test_timedeltas.py

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

11+
from pandas.errors import OutOfBoundsTimedelta
12+
1113

1214
@pytest.mark.parametrize(
1315
"obj,expected",
@@ -37,3 +39,9 @@ def test_huge_nanoseconds_overflow():
3739
# GH 32402
3840
assert delta_to_nanoseconds(Timedelta(1e10)) == 1e10
3941
assert delta_to_nanoseconds(Timedelta(nanoseconds=1e10)) == 1e10
42+
43+
44+
def test_out_of_bounds():
45+
# GH 36615
46+
with pytest.raises(OutOfBoundsTimedelta, match="200000 days"):
47+
Timedelta(np.timedelta64(200000, "D"))

0 commit comments

Comments
 (0)