Skip to content

Commit ce94afa

Browse files
authored
Adjust unxfail condition for nat test for new numpy release (pandas-dev#52867)
1 parent 2c68dd3 commit ce94afa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/compat/numpy/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
_nlv = Version(_np_version)
99
np_version_under1p22 = _nlv < Version("1.22")
1010
np_version_gte1p24 = _nlv >= Version("1.24")
11+
np_version_gte1p24p3 = _nlv >= Version("1.24.3")
1112
is_numpy_dev = _nlv.dev is not None
1213
_min_numpy_ver = "1.21.6"
1314

pandas/tests/scalar/test_nat.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import pytz
1010

1111
from pandas._libs.tslibs import iNaT
12-
from pandas.compat import is_numpy_dev
12+
from pandas.compat.numpy import np_version_gte1p24p3
1313

1414
from pandas import (
1515
DatetimeIndex,
@@ -526,7 +526,7 @@ def test_to_numpy_alias():
526526
pytest.param(
527527
Timedelta(0).to_timedelta64(),
528528
marks=pytest.mark.xfail(
529-
not is_numpy_dev,
529+
not np_version_gte1p24p3,
530530
reason="td64 doesn't return NotImplemented, see numpy#17017",
531531
),
532532
),
@@ -535,7 +535,7 @@ def test_to_numpy_alias():
535535
pytest.param(
536536
Timestamp(0).to_datetime64(),
537537
marks=pytest.mark.xfail(
538-
not is_numpy_dev,
538+
not np_version_gte1p24p3,
539539
reason="dt64 doesn't return NotImplemented, see numpy#17017",
540540
),
541541
),

0 commit comments

Comments
 (0)