We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10022ba commit 802ce4bCopy full SHA for 802ce4b
pandas/tests/tslibs/test_timedeltas.py
@@ -16,8 +16,6 @@
16
(1, 1),
17
(np.int64(2), 2),
18
(np.int32(3), 3),
19
- (Timedelta(1e10), 1e10),
20
- (Timedelta(nanoseconds=1e10), 1e10),
21
],
22
)
23
def test_delta_to_nanoseconds(obj, expected):
@@ -30,3 +28,8 @@ def test_delta_to_nanoseconds_error():
30
28
31
29
with pytest.raises(TypeError, match="<class 'numpy.ndarray'>"):
32
delta_to_nanoseconds(obj)
+
33
+def test_huge_nanoseconds_overflow():
34
+ assert delta_to_nanoseconds(Timedelta(1e10)) == 1e10
35
+ assert delta_to_nanoseconds(Timedelta(nanoseconds=1e10)) == 1e10
0 commit comments