Skip to content

Adjust unxfail condition for nat test #52867

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 1 commit into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions pandas/compat/numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
_nlv = Version(_np_version)
np_version_under1p22 = _nlv < Version("1.22")
np_version_gte1p24 = _nlv >= Version("1.24")
np_version_gte1p24p3 = _nlv >= Version("1.24.3")
is_numpy_dev = _nlv.dev is not None
_min_numpy_ver = "1.21.6"

Expand Down
6 changes: 3 additions & 3 deletions pandas/tests/scalar/test_nat.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytz

from pandas._libs.tslibs import iNaT
from pandas.compat import is_numpy_dev
from pandas.compat.numpy import np_version_gte1p24p3

from pandas import (
DatetimeIndex,
Expand Down Expand Up @@ -526,7 +526,7 @@ def test_to_numpy_alias():
pytest.param(
Timedelta(0).to_timedelta64(),
marks=pytest.mark.xfail(
not is_numpy_dev,
not np_version_gte1p24p3,
reason="td64 doesn't return NotImplemented, see numpy#17017",
),
),
Expand All @@ -535,7 +535,7 @@ def test_to_numpy_alias():
pytest.param(
Timestamp(0).to_datetime64(),
marks=pytest.mark.xfail(
not is_numpy_dev,
not np_version_gte1p24p3,
reason="dt64 doesn't return NotImplemented, see numpy#17017",
),
),
Expand Down