Skip to content

Commit b2acbc4

Browse files
TST: update raises on duplicate arg index (pandas-dev#55509)
1 parent 85a107e commit b2acbc4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/frame/methods/test_update.py

+7
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,10 @@ def test_update_preserve_dtype(self, value_df, value_other, dtype):
206206
expected = DataFrame({"a": [value_other, value_df]}, index=[1, 2])
207207
df.update(other)
208208
tm.assert_frame_equal(df, expected)
209+
210+
def test_update_raises_on_duplicate_argument_index(self):
211+
# GH#55509
212+
df = DataFrame({"a": [True, True]}, index=[1, 2])
213+
other = DataFrame({"a": [False, False]}, index=[1, 1])
214+
with pytest.raises(ValueError, match="duplicate argument index"):
215+
df.update(other)

0 commit comments

Comments
 (0)