8000 Filter warnings in rcparams test (and others) by jenshnielsen · Pull Request #3244 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Filter warnings in rcparams test (and others) #3244

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

Merged
merged 11 commits into from
Aug 26, 2014
Merged
Prev Previous commit
Next Next commit
Add note to test_subplots
  • Loading branch information
jenshnielsen committed Jul 26, 2014
commit 855407bba6a1cfcadc89d51f524236439216bdd9
6 changes: 4 additions & 2 deletions lib/matplotlib/tests/test_subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ def test_exceptions():
# TODO should this test more options?
assert_raises(ValueError, plt.subplots, 2, 2, sharex='blah')
assert_raises(ValueError, plt.subplots, 2, 2, sharey='blah')
# We filter warnings in this test which are genuine since
# the pount of this test is to ensure that this raises.
with warnings.catch_warnings():
warnings.filterwarnings('ignore',
message='.*sharex\ argument\ to\ subplots',
category=UserWarning)
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)
Expand Down
0