Skip to content

TST/CI: xfail test_round_sanity for 32 bit #47803

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

Merged
merged 6 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pandas/tests/scalar/timedelta/test_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
iNaT,
)
from pandas._libs.tslibs.dtypes import NpyDatetimeUnit
from pandas.compat import IS64
from pandas.errors import OutOfBoundsTimedelta

import pandas as pd
Expand Down Expand Up @@ -690,6 +691,7 @@ def test_round_implementation_bounds(self):
with pytest.raises(OverflowError, match=msg):
Timedelta.max.ceil("s")

@pytest.mark.xfail(not IS64, reason="Failing on 32 bit build", strict=False)
@given(val=st.integers(min_value=iNaT + 1, max_value=lib.i8max))
@pytest.mark.parametrize(
"method", [Timedelta.round, Timedelta.floor, Timedelta.ceil]
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/scalar/timestamp/test_unary_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
)
from pandas._libs.tslibs.dtypes import NpyDatetimeUnit
from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG
from pandas.compat import IS64
import pandas.util._test_decorators as td

import pandas._testing as tm
Expand Down Expand Up @@ -297,6 +298,7 @@ def test_round_implementation_bounds(self):
with pytest.raises(OverflowError, match=msg):
Timestamp.max.ceil("s")

@pytest.mark.xfail(not IS64, reason="Failing on 32 bit build", strict=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead what if we just adjust the bounds by 1e9?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just to confirm

@given(val=st.integers(iNaT + 1 + 1e9, lib.i8max - 1e9))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess technically should use 10**9 but yah

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to cap the max and min values to np.iinfo(np.in32) for the 32 bit build instead

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that seems like something really is wrong on the 32bit build, so maybe an xfail is appropriate after all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I will change it back to xfail(strict=False) because I think the hypothesis still doesn't fail this consistently with certain params.

@given(val=st.integers(iNaT + 1, lib.i8max))
@pytest.mark.parametrize(
"method", [Timestamp.round, Timestamp.floor, Timestamp.ceil]
Expand Down