Skip to content

Finish removing nose #7935

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 7 commits into from
Jan 28, 2017
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Make sure convert works without nose.
  • Loading branch information
QuLogic committed Jan 27, 2017
commit c4a19c12ebb95fcccc9cd3f2aba14ef3584ddc06
10 changes: 8 additions & 2 deletions lib/matplotlib/testing/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,14 @@ def convert(filename, cache):
"""
base, extension = filename.rsplit('.', 1)
if extension not in converter:
from nose import SkipTest
raise SkipTest("Don't know how to convert %s files to png" % extension)
reason = "Don't know how to convert %s files to png" % extension
from . import is_called_from_pytest
if is_called_from_pytest():
import pytest
pytest.skip(reason)
else:
from nose import SkipTest
raise SkipTest(reason)
newname = base + '_' + extension + '.png'
if not os.path.exists(filename):
raise IOError("'%s' does not exist" % filename)
Expand Down