Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 855407b

Browse files
committed
Add note to test_subplots
1 parent 669c379 commit 855407b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/tests/test_subplots.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ def test_exceptions():
106106
# TODO should this test more options?
107107
assert_raises(ValueError, plt.subplots, 2, 2, sharex='blah')
108108
assert_raises(ValueError, plt.subplots, 2, 2, sharey='blah')
109+
# We filter warnings in this test which are genuine since
110+
# the pount of this test is to ensure that this raises.
109111
with warnings.catch_warnings():
110112
warnings.filterwarnings('ignore',
111-
message='.*sharex\ argument\ to\ subplots',
112-
category=UserWarning)
113+
message='.*sharex\ argument\ to\ subplots',
114+
category=UserWarning)
113115
assert_raises(ValueError, plt.subplots, 2, 2, -1)
114116
# uncomment this for 1.5
115117
# assert_raises(ValueError, plt.subplots, 2, 2, 0)

0 commit comments

Comments
 (0)