Skip to content

Commit cb82613

Browse files
committed
Fix test
1 parent cd320be commit cb82613

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pandas/tests/reshape/concat/test_concat.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,8 @@ def test_concat_with_moot_ignore_index_and_keys():
945945
df1 = DataFrame([[0]])
946946
df2 = DataFrame([[42]])
947947

948-
msg = (
949-
"Setting ignore_index to true and providing key values are "
950-
"counterproductive. Either should be used."
951-
)
948+
ignore_index = True
949+
keys = ["df1", "df2"]
950+
msg = f"Cannot set {ignore_index=} and specify keys. Either should be used."
952951
with pytest.raises(ValueError, match=msg):
953-
concat([df1, df2], keys=["df1", "df2"], ignore_index=True)
952+
concat([df1, df2], keys=keys, ignore_index=ignore_index)

0 commit comments

Comments
 (0)