Skip to content

Missing cleanup decorator in test_subplots.test_exceptions #6741

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 3 commits into from
Jul 15, 2016
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
14 changes: 2 additions & 12 deletions lib/matplotlib/tests/test_subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ def test_shared():
check_visible(axs, [False, False, True, True], [True, False, True, False])



@cleanup
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.
# the point of this test is to ensure that this raises.
with warnings.catch_warnings():
warnings.filterwarnings('ignore',
message='.*sharex\ argument\ to\ subplots',
Expand All @@ -129,16 +129,6 @@ def test_subplots_offsettext():
axes[1, 1].plot(y, x)


@cleanup
def test_subplots():
# things to test
# - are axes actually shared?
# - are tickmarks correctly hidden?
test_shared()
# - are exceptions thrown correctly
test_exceptions()


if __name__ == "__main__":
import nose
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)