8000 Provide message if test data is not installed by mdboom · Pull Request #5273 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Provide message if test data is not installed #5273

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 1 commit into from
Oct 19, 2015
Merged
Show file tree
Hide file tree
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
Provide message if test data is not installed
  • Loading branch information
mdboom committed Oct 19, 2015
commit 2469db563fe70d44808916a19de80793bacb0cb3
3 changes: 3 additions & 0 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,9 @@ def tk_window_focus():


def verify_test_dependencies():
if not os.path.isdir(os.path.join(os.path.dirname(__file__), 'tests')):
raise ImportError("matplotlib test data is not installed")

try:
import nose
try:
Expand Down
4 changes: 4 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def run(extra_args):
else:
faulthandler.enable()

if not os.path.isdir(
os.path.join(os.path.dirname(matplotlib.__file__), 'tests')):
raise ImportError("matplotlib test data is not installed")

nose.main(addplugins=[x() for x in plugins],
defaultTest=default_test_modules,
argv=sys.argv + extra_args)
Expand Down
0