Skip to content

Commit 9535246

Browse files
authored
Added message to pytest raises for test_constructor_dict (#32236)
1 parent 35537dd commit 9535246

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/frame/test_constructors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ def test_constructor_dict(self):
316316

317317
# mix dict and array, wrong size - no spec for which error should raise
318318
# first
319-
with pytest.raises(ValueError):
319+
msg = "Mixing dicts with non-Series may lead to ambiguous ordering."
320+
with pytest.raises(ValueError, match=msg):
320321
DataFrame({"A": {"a": "a", "b": "b"}, "B": ["a", "b", "c"]})
321322

322323
# Length-one dict micro-optimization

0 commit comments

Comments
 (0)