Skip to content

Commit 37e0520

Browse files
author
MarcoGorelli
committed
fixup multiindex/test_setitem
1 parent e33563a commit 37e0520

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/tests/indexing/multiindex/test_setitem.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ def test_multiindex_assignment_single_dtype(self, using_copy_on_write):
220220
tm.assert_numpy_array_equal(view, exp.values)
221221

222222
# arr + 0.5 cannot be cast losslessly to int, so we upcast
223-
df.loc[4, "c"] = arr + 0.5
223+
with tm.assert_produces_warning(
224+
FutureWarning, match="item of incompatible dtype"
225+
):
226+
df.loc[4, "c"] = arr + 0.5
224227
result = df.loc[4, "c"]
225228
exp = exp + 0.5
226229
tm.assert_series_equal(result, exp)

0 commit comments

Comments
 (0)