Skip to content

Commit 33072d0

Browse files
Update xfails for 2.3.x
1 parent 13bf07a commit 33072d0

File tree

10 files changed

+16
-21
lines changed

10 files changed

+16
-21
lines changed

pandas/tests/arrays/categorical/test_analytics.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
import numpy as np
55
import pytest
66

7-
from pandas._config import using_string_dtype
8-
9-
from pandas.compat import (
10-
HAS_PYARROW,
11-
PYPY,
12-
)
7+
from pandas.compat import PYPY
138

149
from pandas import (
1510
Categorical,
@@ -301,9 +296,6 @@ def test_nbytes(self):
301296
exp = 3 + 3 * 8 # 3 int8s for values + 3 int64s for categories
302297
assert cat.nbytes == exp
303298

304-
@pytest.mark.xfail(
305-
using_string_dtype() and HAS_PYARROW, reason="TODO(infer_string)"
306-
)
307299
def test_memory_usage(self):
308300
cat = Categorical([1, 2, 3])
309301

pandas/tests/copy_view/test_array.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import numpy as np
22
import pytest
33

4-
from pandas._config import using_string_dtype
5-
64
from pandas import (
75
DataFrame,
86
Series,
@@ -159,7 +157,6 @@ def test_dataframe_array_ea_dtypes(using_copy_on_write):
159157
assert arr.flags.writeable is True
160158

161159

162-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
163160
def test_dataframe_array_string_dtype(using_copy_on_write, using_array_manager):
164161
df = DataFrame({"a": ["a", "b"]}, dtype="string")
165162
arr = np.asarray(df)

pandas/tests/copy_view/test_interp_fillna.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
from pandas._config import using_string_dtype
55

6-
from pandas.compat import HAS_PYARROW
7-
86
from pandas import (
97
NA,
108
ArrowDtype,
@@ -161,7 +159,7 @@ def test_interpolate_cleaned_fill_method(using_copy_on_write):
161159
tm.assert_frame_equal(df, df_orig)
162160

163161

164-
@pytest.mark.xfail(using_string_dtype() and HAS_PYARROW, reason="TODO(infer_string)")
162+
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
165163
def test_interpolate_object_convert_no_op(using_copy_on_write):
166164
df = DataFrame({"a": ["a", "b", "c"], "b": 1})
167165
arr_a = get_array(df, "a")

pandas/tests/frame/methods/test_info.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from pandas._config import using_string_dtype
1111

1212
from pandas.compat import (
13-
HAS_PYARROW,
1413
IS64,
1514
PYPY,
1615
)
@@ -521,7 +520,7 @@ def test_info_int_columns():
521520
assert result == expected
522521

523522

524-
@pytest.mark.xfail(using_string_dtype() and HAS_PYARROW, reason="TODO(infer_string)")
523+
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
525524
def test_memory_usage_empty_no_warning():
526525
# GH#50066
527526
df = DataFrame(index=["a", "b"])

pandas/tests/groupby/aggregate/test_cython.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ def test_cython_agg_return_dict():
164164
tm.assert_series_equal(ts, expected)
165165

166166

167-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
168167
def test_cython_fail_agg():
169168
dr = bdate_range("1/1/2000", periods=50)
170169
ts = Series(["A", "B", "C", "D", "E"] * 10, index=dr)

pandas/tests/indexes/base_class/test_reshape.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55
import pytest
66

7+
import pandas as pd
78
from pandas import Index
89
import pandas._testing as tm
910

@@ -35,7 +36,9 @@ def test_insert(self):
3536
null_index = Index([])
3637
tm.assert_index_equal(Index(["a"], dtype=object), null_index.insert(0, "a"))
3738

38-
def test_insert_missing(self, nulls_fixture, using_infer_string):
39+
def test_insert_missing(self, request, nulls_fixture, using_infer_string):
40+
if using_infer_string and nulls_fixture is pd.NA:
41+
request.applymarker(pytest.mark.xfail(reason="TODO(infer_string)"))
3942
# GH#22295
4043
# test there is no mangling of NA values
4144
expected = Index(["a", nulls_fixture, "b", "c"], dtype=object)

pandas/tests/indexing/test_loc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,9 @@ def test_loc_setitem_listlike_with_timedelta64index(self, indexer, expected):
14431443

14441444
tm.assert_frame_equal(expected, df)
14451445

1446+
@pytest.mark.xfail(
1447+
using_string_dtype() and not HAS_PYARROW, reason="TODO(infer_string)"
1448+
)
14461449
def test_loc_setitem_categorical_values_partial_column_slice(self):
14471450
# Assigning a Category to parts of a int/... column uses the values of
14481451
# the Categorical

pandas/tests/io/parser/common/test_common_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from pandas._config import using_string_dtype
1616

17+
from pandas.compat import HAS_PYARROW
1718
from pandas.errors import (
1819
EmptyDataError,
1920
ParserError,
@@ -917,7 +918,7 @@ def test_dict_keys_as_names(all_parsers):
917918
tm.assert_frame_equal(result, expected)
918919

919920

920-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
921+
@pytest.mark.xfail(using_string_dtype() and HAS_PYARROW, reason="TODO(infer_string)")
921922
@xfail_pyarrow # UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0
922923
def test_encoding_surrogatepass(all_parsers):
923924
# GH39017

pandas/tests/series/methods/test_replace.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ def test_replace_mixed_types_with_string(self):
391391
expected = pd.Series([1, np.nan, 3, np.nan, 4, 5])
392392
tm.assert_series_equal(expected, result)
393393

394+
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
394395
@pytest.mark.parametrize(
395396
"categorical, numeric",
396397
[

pandas/tests/series/test_logical_ops.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ def test_reverse_ops_with_index(self, op, expected):
368368
result = op(ser, idx)
369369
tm.assert_series_equal(result, expected)
370370

371-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
371+
@pytest.mark.xfail(
372+
using_string_dtype() and not HAS_PYARROW, reason="TODO(infer_string)"
373+
)
372374
def test_logical_ops_label_based(self, using_infer_string):
373375
# GH#4947
374376
# logical ops should be label based

0 commit comments

Comments
 (0)