@@ -2739,11 +2739,11 @@ def test_errorbar_plot_different_kinds(self, kind):
27392739 ax = _check_plot_works (df .plot , xerr = 0.2 , yerr = 0.2 , kind = kind )
27402740 self ._check_has_errorbars (ax , xerr = 2 , yerr = 2 )
27412741
2742- with tm . assert_produces_warning ( UserWarning ):
2743- # _check_plot_works creates subplots inside,
2744- # which leads to warnings like this:
2745- # UserWarning: To output multiple subplots,
2746- # the figure containing the passed axes is being cleared
2742+ msg = (
2743+ "To output multiple subplots, "
2744+ "the figure containing the passed axes is being cleared"
2745+ )
2746+ with tm . assert_produces_warning ( UserWarning , match = msg ):
27472747 # Similar warnings were observed in GH #13188
27482748 axes = _check_plot_works (
27492749 df .plot , yerr = df_err , xerr = df_err , subplots = True , kind = kind
@@ -2820,11 +2820,11 @@ def test_errorbar_timeseries(self, kind):
28202820 ax = _check_plot_works (tdf .plot , yerr = tdf_err , kind = kind )
28212821 self ._check_has_errorbars (ax , xerr = 0 , yerr = 2 )
28222822
2823- with tm . assert_produces_warning ( UserWarning ):
2824- # _check_plot_works creates subplots inside,
2825- # which leads to warnings like this:
2826- # UserWarning: To output multiple subplots,
2827- # the figure containing the passed axes is being cleared
2823+ msg = (
2824+ "To output multiple subplots, "
2825+ "the figure containing the passed axes is being cleared"
2826+ )
2827+ with tm . assert_produces_warning ( UserWarning , match = msg ):
28282828 # Similar warnings were observed in GH #13188
28292829 axes = _check_plot_works (tdf .plot , kind = kind , yerr = tdf_err , subplots = True )
28302830 self ._check_has_errorbars (axes , xerr = 0 , yerr = 1 )
0 commit comments