-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: OutOfBoundsTimedelta not raised for out-of-bounds Timedelta #42235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
feefladder
commented
Jun 25, 2021
- closes BUG: OutOfBoundsTimedelta not raised for out-of-bounds Timedelta #36615
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
@@ -37,3 +39,9 @@ def test_huge_nanoseconds_overflow(): | |||
# GH 32402 | |||
assert delta_to_nanoseconds(Timedelta(1e10)) == 1e10 | |||
assert delta_to_nanoseconds(Timedelta(nanoseconds=1e10)) == 1e10 | |||
|
|||
|
|||
def test_out_of_bounds(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should go in pandas.tests.scalar.timedelta.test_constructors
@@ -204,15 +204,26 @@ def test_overflow_on_construction(): | |||
Timedelta(timedelta(days=13 * 19999)) | |||
|
|||
|
|||
def test_construction_out_of_bounds_td64(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was already here and should have caught #36615.
I parametrized it, but this is still a bit puzzling
can you merge master |
@jbrockmendel ok here |
LGTM |
thanks @joeperdefloep |