Skip to content

Commit 71de5e2

Browse files
committed
TST: Capture UserWarning for Bar plot with MultiIndex
1 parent 24dec22 commit 71de5e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/plotting/test_frame.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3422,7 +3422,9 @@ def test_bar_multiindex(self):
34223422
errors = gp3.std()
34233423

34243424
# No assertion we just ensure that we can plot a MultiIndex bar plot
3425-
means.plot.bar(yerr=errors, capsize=4)
3425+
# and are getting a UserWarning
3426+
with tm.assert_produces_warning(UserWarning):
3427+
means.plot.bar(yerr=errors, capsize=4)
34263428

34273429

34283430
def _generate_4_axes_via_gridspec():

0 commit comments

Comments
 (0)