Skip to content

Commit 338ae86

Browse files
committed
wip
1 parent bc14f55 commit 338ae86

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pandas/tests/frame/indexing/test_setitem.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,18 +1356,12 @@ def test_frame_setitem_empty_dataframe(self):
13561356
def test_full_setter_loc_incompatible_dtype():
13571357
# https://github.com/pandas-dev/pandas/issues/55791
13581358
df = DataFrame({"a": [1, 2]})
1359-
with tm.assert_produces_warning(FutureWarning, match="incompatible dtype"):
1359+
with pytest.raises(TypeError, match="Invalid value"):
13601360
df.loc[:, "a"] = True
1361-
expected = DataFrame({"a": [True, True]})
1362-
tm.assert_frame_equal(df, expected)
13631361

1364-
df = DataFrame({"a": [1, 2]})
1365-
with tm.assert_produces_warning(FutureWarning, match="incompatible dtype"):
1362+
with pytest.raises(TypeError, match="Invalid value"):
13661363
df.loc[:, "a"] = {0: 3.5, 1: 4.5}
1367-
expected = DataFrame({"a": [3.5, 4.5]})
1368-
tm.assert_frame_equal(df, expected)
13691364

1370-
df = DataFrame({"a": [1, 2]})
13711365
df.loc[:, "a"] = {0: 3, 1: 4}
13721366
expected = DataFrame({"a": [3, 4]})
13731367
tm.assert_frame_equal(df, expected)

0 commit comments

Comments
 (0)