Skip to content

Commit 3aed02f

Browse files
author
MarcoGorelli
committed
fixup test_iloc
1 parent 24ca7c2 commit 3aed02f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/tests/indexing/test_iloc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,10 @@ def test_iloc_setitem_with_scalar_index(self, indexer, value):
723723
# elementwisely, not using "setter('A', ['Z'])".
724724

725725
df = DataFrame([[1, 2], [3, 4]], columns=["A", "B"])
726-
df.iloc[0, indexer] = value
726+
with tm.assert_produces_warning(
727+
FutureWarning, match="item of incompatible dtype"
728+
):
729+
df.iloc[0, indexer] = value
727730
result = df.iloc[0, 0]
728731

729732
assert is_scalar(result) and result == "Z"

0 commit comments

Comments
 (0)