Skip to content

Commit dca2c3e

Browse files
committed
un-xfail and adjust more tests
1 parent 490fd90 commit dca2c3e

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

pandas/tests/frame/methods/test_quantile.py

Lines changed: 0 additions & 8 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
import pandas as pd
75
from pandas import (
86
DataFrame,
@@ -354,7 +352,6 @@ def test_quantile_multi_empty(self, interp_method):
354352
)
355353
tm.assert_frame_equal(result, expected)
356354

357-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
358355
def test_quantile_datetime(self, unit):
359356
dti = pd.to_datetime(["2010", "2011"]).as_unit(unit)
360357
df = DataFrame({"a": dti, "b": [0, 5]})
@@ -408,7 +405,6 @@ def test_quantile_datetime(self, unit):
408405
expected = DataFrame(index=[0.5], columns=[])
409406
tm.assert_frame_equal(result, expected)
410407

411-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
412408
@pytest.mark.parametrize(
413409
"dtype",
414410
[
@@ -679,7 +675,6 @@ def test_quantile_nat(self, interp_method, request, using_array_manager, unit):
679675
)
680676
tm.assert_frame_equal(res, exp)
681677

682-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
683678
def test_quantile_empty_no_rows_floats(self, interp_method):
684679
interpolation, method = interp_method
685680

@@ -918,7 +913,6 @@ def test_quantile_ea_scalar(self, request, obj, index):
918913
else:
919914
tm.assert_series_equal(result, expected)
920915

921-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
922916
@pytest.mark.parametrize(
923917
"dtype, expected_data, expected_index, axis",
924918
[
@@ -937,7 +931,6 @@ def test_empty_numeric(self, dtype, expected_data, expected_index, axis):
937931
)
938932
tm.assert_series_equal(result, expected)
939933

940-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
941934
@pytest.mark.parametrize(
942935
"dtype, expected_data, expected_index, axis, expected_dtype",
943936
[
@@ -956,7 +949,6 @@ def test_empty_datelike(
956949
)
957950
tm.assert_series_equal(result, expected)
958951

959-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
960952
@pytest.mark.parametrize(
961953
"expected_data, expected_index, axis",
962954
[

pandas/tests/groupby/test_numeric_only.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,12 @@ def test_axis1_numeric_only(request, groupby_func, numeric_only, using_infer_str
275275
"has no kernel",
276276
)
277277
if using_infer_string:
278-
import pyarrow as pa
278+
try:
279+
import pyarrow as pa
279280

280-
errs = (TypeError, pa.lib.ArrowNotImplementedError)
281+
errs = (TypeError, pa.lib.ArrowNotImplementedError)
282+
except ImportError:
283+
errs = TypeError
281284
else:
282285
errs = TypeError
283286
with pytest.raises(errs, match=f"({'|'.join(msgs)})"):

pandas/tests/groupby/test_raises.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ def func(x):
219219
getattr(gb, how)(func)
220220

221221

222-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
223222
@pytest.mark.parametrize("how", ["agg", "transform"])
224223
@pytest.mark.parametrize("groupby_func_np", [np.sum, np.mean])
225224
def test_groupby_raises_string_np(

pandas/tests/io/excel/test_writers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ def test_excel_multindex_roundtrip(
286286
)
287287
tm.assert_frame_equal(df, act, check_names=check_names)
288288

289-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
290289
def test_read_excel_parse_dates(self, ext):
291290
# see gh-11544, gh-12051
292291
df = DataFrame(

0 commit comments

Comments
 (0)