Skip to content

Commit c1f4c5d

Browse files
authored
TST: Remove some old xfails (#33680)
1 parent 38e1b9b commit c1f4c5d

File tree

6 files changed

+1
-37
lines changed

6 files changed

+1
-37
lines changed

pandas/tests/arrays/sparse/test_arithmetics.py

-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ def _assert(self, a, b):
3131

3232
def _check_numeric_ops(self, a, b, a_dense, b_dense, mix, op):
3333
with np.errstate(invalid="ignore", divide="ignore"):
34-
if op in [operator.floordiv, ops.rfloordiv]:
35-
# FIXME: GH#13843
36-
if self._base == pd.Series and a.dtype.subtype == np.dtype("int64"):
37-
pytest.xfail("Not defined/working. See GH#13843")
38-
3934
if mix:
4035
result = op(a, b_dense).to_dense()
4136
else:

pandas/tests/groupby/test_function.py

-21
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
NaT,
1717
Series,
1818
Timestamp,
19-
_is_numpy_dev,
2019
date_range,
2120
isna,
2221
)
@@ -698,11 +697,6 @@ def test_numpy_compat(func):
698697
getattr(g, func)(foo=1)
699698

700699

701-
@pytest.mark.xfail(
702-
_is_numpy_dev,
703-
reason="https://github.com/pandas-dev/pandas/issues/31992",
704-
strict=False,
705-
)
706700
def test_cummin(numpy_dtypes_for_minmax):
707701
dtype = numpy_dtypes_for_minmax[0]
708702
min_val = numpy_dtypes_for_minmax[1]
@@ -751,11 +745,6 @@ def test_cummin(numpy_dtypes_for_minmax):
751745
tm.assert_series_equal(result, expected)
752746

753747

754-
@pytest.mark.xfail(
755-
_is_numpy_dev,
756-
reason="https://github.com/pandas-dev/pandas/issues/31992",
757-
strict=False,
758-
)
759748
def test_cummin_all_nan_column():
760749
base_df = pd.DataFrame({"A": [1, 1, 1, 1, 2, 2, 2, 2], "B": [np.nan] * 8})
761750

@@ -766,11 +755,6 @@ def test_cummin_all_nan_column():
766755
tm.assert_frame_equal(expected, result)
767756

768757

769-
@pytest.mark.xfail(
770-
_is_numpy_dev,
771-
reason="https://github.com/pandas-dev/pandas/issues/31992",
772-
strict=False,
773-
)
774758
def test_cummax(numpy_dtypes_for_minmax):
775759
dtype = numpy_dtypes_for_minmax[0]
776760
max_val = numpy_dtypes_for_minmax[2]
@@ -819,11 +803,6 @@ def test_cummax(numpy_dtypes_for_minmax):
819803
tm.assert_series_equal(result, expected)
820804

821805

822-
@pytest.mark.xfail(
823-
_is_numpy_dev,
824-
reason="https://github.com/pandas-dev/pandas/issues/31992",
825-
strict=False,
826-
)
827806
def test_cummax_all_nan_column():
828807
base_df = pd.DataFrame({"A": [1, 1, 1, 1, 2, 2, 2, 2], "B": [np.nan] * 8})
829808

pandas/tests/groupby/transform/test_transform.py

-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
MultiIndex,
1616
Series,
1717
Timestamp,
18-
_is_numpy_dev,
1918
concat,
2019
date_range,
2120
)
@@ -330,8 +329,6 @@ def test_transform_transformation_func(transformation_func):
330329
if transformation_func in ["pad", "backfill", "tshift", "cumcount"]:
331330
# These transformation functions are not yet covered in this test
332331
pytest.xfail("See GH 31269")
333-
elif _is_numpy_dev and transformation_func in ["cummin"]:
334-
pytest.xfail("https://github.com/pandas-dev/pandas/issues/31992")
335332
elif transformation_func == "fillna":
336333
test_op = lambda x: x.transform("fillna", value=0)
337334
mock_op = lambda x: x.fillna(value=0)

pandas/tests/io/test_pickle.py

-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ def test_pickle_path_localpath():
196196
tm.assert_frame_equal(df, result)
197197

198198

199-
@pytest.mark.xfail(reason="GitHub issue #31310", strict=False)
200199
def test_legacy_sparse_warning(datapath):
201200
"""
202201

pandas/tests/scalar/period/test_period.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from datetime import date, datetime, timedelta
2-
from distutils.version import StrictVersion
32

4-
import dateutil
53
import numpy as np
64
import pytest
75
import pytz
@@ -1437,11 +1435,6 @@ def test_period_immutable():
14371435
per.freq = 2 * freq
14381436

14391437

1440-
@pytest.mark.xfail(
1441-
StrictVersion(dateutil.__version__.split(".dev")[0]) < StrictVersion("2.7.0"),
1442-
reason="Bug in dateutil < 2.7.0 when parsing old dates: Period('0001-01-07', 'D')",
1443-
strict=False,
1444-
)
14451438
def test_small_year_parsing():
14461439
per1 = Period("0001-01-07", "D")
14471440
assert per1.year == 1

pandas/tests/scalar/timedelta/test_arithmetic.py

+1
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ def test_td_div_numeric_scalar(self):
417417
np.float64("NaN"),
418418
marks=pytest.mark.xfail(
419419
_is_numpy_dev,
420+
raises=RuntimeWarning,
420421
reason="https://github.com/pandas-dev/pandas/issues/31992",
421422
strict=False,
422423
),

0 commit comments

Comments
 (0)