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

Skip to content

Make matplotlib.test() print meaninful messages when baseline images are not installed #2379

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
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
11 changes: 11 additions & 0 deletions lib/matplotlib/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@
from matplotlib import rcParams, rcdefaults, use

import difflib
import os

from matplotlib import rcParams, rcdefaults, use


_multiprocess_can_split_ = True


# Check that the test directories exist
if not os.path.exists(os.path.join(
os.path.dirname(__file__), 'baseline_images')):
raise IOError(
'The baseline image directory does not exist. '
'This is most likely because the test data is not installed. '
'You may need to install matplotlib from source to get the '
'test data.')


def setup():
# The baseline images are created in this locale, so we should use
# it during all of the tests.
Expand Down