Skip to content

Commit b539868

Browse files
committed
Update test_setitem and test_slice with modified error message
1 parent 7b5d864 commit b539868

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/tests/frame/indexing/test_setitem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ def test_setitem_loc_empty_indexer_raises_with_non_empty_value(self, box):
10981098
indexer = box([], dtype="object")
10991099
else:
11001100
indexer = box([])
1101-
msg = "Must have equal len keys and value when setting with an iterable"
1101+
msg = "Length mismatch when setting Dataframe with an iterable"
11021102
with pytest.raises(ValueError, match=msg):
11031103
df.loc[indexer, ["b"]] = [1]
11041104

pandas/tests/indexing/multiindex/test_slice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def test_per_axis_per_level_setitem(self):
660660
[[100], [100, 100]], dtype="int64"
661661
)
662662

663-
msg = "Must have equal len keys and value when setting with an iterable"
663+
msg = "Length mismatch when setting Dataframe with an iterable"
664664
with pytest.raises(ValueError, match=msg):
665665
df.loc[(slice(None), 1), (slice(None), ["foo"])] = np.array(
666666
[100, 100, 100, 100], dtype="int64"

0 commit comments

Comments
 (0)