We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b0f48b commit adfe650Copy full SHA for adfe650
pandas/tests/reshape/merge/test_merge.py
@@ -2088,13 +2088,16 @@ def test_merge_suffix_type_error(col1, col2, suffixes):
2088
2089
2090
@pytest.mark.parametrize(
2091
- "col1, col2, suffixes", [("a", "a", ("a", "b", "c"))],
+ "col1, col2, suffixes, msg",
2092
+ [
2093
+ ("a", "a", ("a", "b", "c"), r"too many values to unpack \(expected 2\)"),
2094
+ ("a", "a", ("a"), r"not enough values to unpack \(expected 2, got 1\)"),
2095
+ ],
2096
)
-def test_merge_suffix_length_error(col1, col2, suffixes):
2097
+def test_merge_suffix_length_error(col1, col2, suffixes, msg):
2098
a = pd.DataFrame({col1: [1, 2, 3]})
2099
b = pd.DataFrame({col2: [3, 4, 5]})
2100
- msg = r"too many values to unpack \(expected 2\)"
2101
with pytest.raises(ValueError, match=msg):
2102
pd.merge(a, b, left_index=True, right_index=True, suffixes=suffixes)
2103
0 commit comments