Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: match matplotlib warning message #37666

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions pandas/tests/plotting/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2739,11 +2739,11 @@ def test_errorbar_plot_different_kinds(self, kind):
ax = _check_plot_works(df.plot, xerr=0.2, yerr=0.2, kind=kind)
self._check_has_errorbars(ax, xerr=2, yerr=2)

with tm.assert_produces_warning(UserWarning):
# _check_plot_works creates subplots inside,
# which leads to warnings like this:
# UserWarning: To output multiple subplots,
# the figure containing the passed axes is being cleared
msg = (
"To output multiple subplots, "
"the figure containing the passed axes is being cleared"
)
with tm.assert_produces_warning(UserWarning, match=msg):
# Similar warnings were observed in GH #13188
axes = _check_plot_works(
df.plot, yerr=df_err, xerr=df_err, subplots=True, kind=kind
Expand Down Expand Up @@ -2820,11 +2820,11 @@ def test_errorbar_timeseries(self, kind):
ax = _check_plot_works(tdf.plot, yerr=tdf_err, kind=kind)
self._check_has_errorbars(ax, xerr=0, yerr=2)

with tm.assert_produces_warning(UserWarning):
# _check_plot_works creates subplots inside,
# which leads to warnings like this:
# UserWarning: To output multiple subplots,
# the figure containing the passed axes is being cleared
msg = (
"To output multiple subplots, "
"the figure containing the passed axes is being cleared"
)
with tm.assert_produces_warning(UserWarning, match=msg):
# Similar warnings were observed in GH #13188
axes = _check_plot_works(tdf.plot, kind=kind, yerr=tdf_err, subplots=True)
self._check_has_errorbars(axes, xerr=0, yerr=1)
Expand Down