8000 Provide message if test data is not installed · matplotlib/matplotlib@7f9f606 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f9f606

Browse files
committed
Provide message if test data is not installed
1 parent 333136b commit 7f9f606

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/matplotlib/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,9 @@ def tk C30D _window_focus():
14841484

14851485

14861486
def verify_test_dependencies():
1487+
if not os.path.isdir(os.path.join(os.path.dirname(__file__), 'tests')):
1488+
raise ImportError("matplotlib test data is not installed")
1489+
14871490
try:
14881491
import nose
14891492
try:

tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ def run(extra_args):
4545
else:
4646
faulthandler.enable()
4747

48+
if not os.path.isdir(
49+
os.path.join(os.path.dirname(matplotlib.__file), 'tests')):
50+
raise ImportError("matplotlib test data is not installed")
51+
4852
nose.main(addplugins=[x() for x in plugins],
4953
defaultTest=default_test_modules,
5054
argv=sys.argv + extra_args)

0 commit comments

Comments
 (0)
0