@@ -2739,11 +2739,11 @@ def test_errorbar_plot_different_kinds(self, kind):
2739
2739
ax = _check_plot_works (df .plot , xerr = 0.2 , yerr = 0.2 , kind = kind )
2740
2740
self ._check_has_errorbars (ax , xerr = 2 , yerr = 2 )
2741
2741
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 ):
2747
2747
# Similar warnings were observed in GH #13188
2748
2748
axes = _check_plot_works (
2749
2749
df .plot , yerr = df_err , xerr = df_err , subplots = True , kind = kind
@@ -2820,11 +2820,11 @@ def test_errorbar_timeseries(self, kind):
2820
2820
ax = _check_plot_works (tdf .plot , yerr = tdf_err , kind = kind )
2821
2821
self ._check_has_errorbars (ax , xerr = 0 , yerr = 2 )
2822
2822
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 ):
2828
2828
# Similar warnings were observed in GH #13188
2829
2829
axes = _check_plot_works (tdf .plot , kind = kind , yerr = tdf_err , subplots = True )
2830
2830
self ._check_has_errorbars (axes , xerr = 0 , yerr = 1 )
0 commit comments