We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ce150d commit 7bbe4a5Copy full SHA for 7bbe4a5
pandas/tests/tslibs/test_timedeltas.py
@@ -8,6 +8,8 @@
8
offsets,
9
)
10
11
+from pandas.errors import OutOfBoundsTimedelta
12
+
13
14
@pytest.mark.parametrize(
15
"obj,expected",
@@ -37,3 +39,9 @@ def test_huge_nanoseconds_overflow():
37
39
# GH 32402
38
40
assert delta_to_nanoseconds(Timedelta(1e10)) == 1e10
41
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