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

Correct regex in filterwarnings #5735

Merged
merged 2 commits into from Dec 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/figure.py
Expand Up @@ -1097,8 +1097,8 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
# instead treated as a bool for sharex.
if isinstance(sharex, int):
warnings.warn(
"sharex argument to add_subplots() was an integer. "
"Did you intend to use add_subplot() (without 's')?")
"sharex argument to subplots() was an integer. "
"Did you intend to use subplot() (without 's')?")

raise ValueError("sharex [%s] must be one of %s" %
(sharex, share_values))
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/tests/test_subplots.py
Expand Up @@ -113,8 +113,7 @@ def test_exceptions():
message='.*sharex\ argument\ to\ subplots',
category=UserWarning)
assert_raises(ValueError, plt.subplots, 2, 2, -1)
# uncomment this for 1.5
# assert_raises(ValueError, plt.subplots, 2, 2, 0)
assert_raises(ValueError, plt.subplots, 2, 2, 0)
assert_raises(ValueError, plt.subplots, 2, 2, 5)


Expand Down