Skip to content

Commit c66af8e

Browse files
committed
TST: Capture UserWarning for Bar plot with MultiIndex
1 parent 267af05 commit c66af8e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/tests/plotting/test_frame.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3409,7 +3409,11 @@ def test_bar_multiindex(self):
34093409
errors = gp3.std()
34103410

34113411
# No assertion we just ensure that we can plot a MultiIndex bar plot
3412-
means.plot.bar(yerr=errors, capsize=4)
3412+
# and are getting a UserWarning
3413+
with pytest.warns(
3414+
UserWarning, match="Bar plot with a MultiIndex is not supported.",
3415+
):
3416+
means.plot.bar(yerr=errors, capsize=4)
34133417

34143418

34153419
def _generate_4_axes_via_gridspec():

0 commit comments

Comments
 (0)