Skip to content

Commit b09a160

Browse files
committed
CoW: Warn for cases that go through putmask
1 parent 24fdde6 commit b09a160

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

pandas/tests/apply/test_invalid_arg.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
DataFrame,
1919
Series,
2020
date_range,
21-
notna,
2221
)
2322
import pandas._testing as tm
2423

@@ -150,8 +149,6 @@ def test_transform_axis_1_raises():
150149
Series([1]).transform("sum", axis=1)
151150

152151

153-
# TODO(CoW-warn) should not need to warn
154-
@pytest.mark.filterwarnings("ignore:Setting a value on a view:FutureWarning")
155152
def test_apply_modify_traceback():
156153
data = DataFrame(
157154
{
@@ -207,11 +204,6 @@ def transform(row):
207204
row["D"] = 7
208205
return row
209206

210-
def transform2(row):
211-
if notna(row["C"]) and row["C"].startswith("shin") and row["A"] == "foo":
212-
row["D"] = 7
213-
return row
214-
215207
msg = "'float' object has no attribute 'startswith'"
216208
with pytest.raises(AttributeError, match=msg):
217209
data.apply(transform, axis=1)

0 commit comments

Comments
 (0)