Skip to content

Commit

Permalink
CoW: Warn for cases that go through putmask
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl committed Nov 25, 2023
1 parent 24fdde6 commit b09a160
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pandas/tests/apply/test_invalid_arg.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
DataFrame,
Series,
date_range,
notna,
)
import pandas._testing as tm

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


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

def transform2(row):
if notna(row["C"]) and row["C"].startswith("shin") and row["A"] == "foo":
row["D"] = 7
return row

msg = "'float' object has no attribute 'startswith'"
with pytest.raises(AttributeError, match=msg):
data.apply(transform, axis=1)
Expand Down

0 comments on commit b09a160

Please sign in to comment.