Skip to content

Commit c19ef4b

Browse files
committed
TST: Capture UserWarning for Bar plot with MultiIndex
1 parent 28f06fc commit c19ef4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/plotting/test_frame.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3499,7 +3499,9 @@ def test_bar_multiindex(self):
34993499
errors = gp3.std()
35003500

35013501
# No assertion we just ensure that we can plot a MultiIndex bar plot
3502-
means.plot.bar(yerr=errors, capsize=4)
3502+
# and are getting a UserWarning
3503+
with tm.assert_produces_warning(UserWarning):
3504+
means.plot.bar(yerr=errors, capsize=4)
35033505

35043506

35053507
def _generate_4_axes_via_gridspec():

0 commit comments

Comments
 (0)