Correct regex in filterwarnings #5735

Merged
merged 2 commits into from Dec 23, 2015
View
@@ -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))
@@ -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)