Skip to content

Commit 7a97430

Browse files
committed
Fix
1 parent 15880ae commit 7a97430

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pandas/tests/frame/methods/test_fillna.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,14 @@ def test_fillna_mixed_float(self, mixed_float_frame):
108108
_check_mixed_float(result, dtype={"C": None})
109109

110110
def test_fillna_empty(self, using_copy_on_write):
111+
if using_copy_on_write:
112+
pytest.skip("condition is unnecessary complex and is deprecated anyway")
111113
# empty frame (GH#2778)
112114
df = DataFrame(columns=["x"])
113115
for m in ["pad", "backfill"]:
114116
msg = "Series.fillna with 'method' is deprecated"
115117
with tm.assert_produces_warning(FutureWarning, match=msg):
116-
if using_copy_on_write:
117-
with tm.assert_produces_warning(ChainedAssignmentError):
118-
df.x.fillna(method=m, inplace=True)
119-
else:
120-
df.x.fillna(method=m, inplace=True)
118+
df.x.fillna(method=m, inplace=True)
121119
df.x.fillna(method=m)
122120

123121
def test_fillna_different_dtype(self):

0 commit comments

Comments
 (0)