Skip to content

Commit ef2fda8

Browse files
committed
wip
1 parent df0aa86 commit ef2fda8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

pandas/tests/frame/indexing/test_coercion.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,11 @@ def test_26395(indexer_al):
9191
expected = DataFrame({"D": [0, 0, 2]}, index=["A", "B", "C"], dtype=np.int64)
9292
tm.assert_frame_equal(df, expected)
9393

94-
with tm.assert_produces_warning(
95-
FutureWarning, match="Setting an item of incompatible dtype"
96-
):
94+
with pytest.raises(TypeError, match="Invalid value"):
9795
indexer_al(df)["C", "D"] = 44.5
98-
expected = DataFrame({"D": [0, 0, 44.5]}, index=["A", "B", "C"], dtype=np.float64)
99-
tm.assert_frame_equal(df, expected)
10096

101-
with tm.assert_produces_warning(
102-
FutureWarning, match="Setting an item of incompatible dtype"
103-
):
97+
with pytest.raises(TypeError, match="Invalid value"):
10498
indexer_al(df)["C", "D"] = "hello"
105-
expected = DataFrame({"D": [0, 0, "hello"]}, index=["A", "B", "C"], dtype=object)
106-
tm.assert_frame_equal(df, expected)
10799

108100

109101
@pytest.mark.xfail(reason="unwanted upcast")

0 commit comments

Comments
 (0)