Skip to content

Commit 380372f

Browse files
un-xfail tests for replace/fillna downcasting
1 parent 91e65b6 commit 380372f

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

pandas/tests/frame/methods/test_combine_first.py

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

6-
from pandas._config import using_string_dtype
7-
86
from pandas.core.dtypes.cast import find_common_type
97
from pandas.core.dtypes.common import is_dtype_equal
108

@@ -32,7 +30,6 @@ def test_combine_first_mixed(self):
3230
combined = f.combine_first(g)
3331
tm.assert_frame_equal(combined, exp)
3432

35-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
3633
def test_combine_first(self, float_frame, using_infer_string):
3734
# disjoint
3835
head, tail = float_frame[:5], float_frame[5:]

pandas/tests/frame/methods/test_fillna.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def test_fillna_empty(self, using_copy_on_write):
126126
df.x.fillna(method=m, inplace=True)
127127
df.x.fillna(method=m)
128128

129-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
130129
def test_fillna_different_dtype(self, using_infer_string):
131130
# with different dtype (GH#3386)
132131
df = DataFrame(
@@ -371,7 +370,6 @@ def test_fillna_dictlike_value_duplicate_colnames(self, columns):
371370
expected["A"] = 0.0
372371
tm.assert_frame_equal(result, expected)
373372

374-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
375373
def test_fillna_dtype_conversion(self, using_infer_string):
376374
# make sure that fillna on an empty frame works
377375
df = DataFrame(index=["A", "B", "C"], columns=[1, 2, 3, 4, 5])

pandas/tests/frame/methods/test_replace.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,6 @@ def test_replace_mixed_int_block_splitting(self):
624624
result = df.replace(0, 0.5)
625625
tm.assert_frame_equal(result, expected)
626626

627-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
628627
def test_replace_mixed2(self, using_infer_string):
629628
# to object block upcasting
630629
df = DataFrame(
@@ -1444,7 +1443,6 @@ def test_replace_ea_ignore_float(self, frame_or_series, value):
14441443
result = obj.replace(1.0, 0.0)
14451444
tm.assert_equal(expected, result)
14461445

1447-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
14481446
def test_replace_value_category_type(self):
14491447
"""
14501448
Test for #23305: to ensure category dtypes are maintained
@@ -1540,7 +1538,6 @@ def test_replace_with_compiled_regex(self):
15401538
expected = DataFrame(["z", "b", "c"])
15411539
tm.assert_frame_equal(result, expected)
15421540

1543-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
15441541
def test_replace_intervals(self, using_infer_string):
15451542
# https://github.com/pandas-dev/pandas/issues/35931
15461543
df = DataFrame({"a": [pd.Interval(0, 1), pd.Interval(0, 1)]})

pandas/tests/series/methods/test_replace.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,6 @@ def test_replace_value_none_dtype_numeric(self, val):
760760
expected = pd.Series([1, None], dtype=object)
761761
tm.assert_series_equal(result, expected)
762762

763-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
764763
def test_replace_change_dtype_series(self, using_infer_string):
765764
# GH#25797
766765
df = pd.DataFrame.from_dict({"Test": ["0.5", True, "0.6"]})

0 commit comments

Comments
 (0)