We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7305e34 + e8a7272 commit d404817Copy full SHA for d404817
nibabel/__init__.py
@@ -67,16 +67,17 @@
67
from . import streamlines
68
from . import viewers
69
70
-# be friendly on systems with ancient numpy -- no tests, but at least
71
-# importable
+# Note test requirement for "mock". Requirement for "nose" tested by numpy.
72
try:
+ import mock
73
+except ImportError:
74
+ def test(*args, **kwargs):
75
+ raise RuntimeError('Need "mock" package for tests')
76
+else:
77
from numpy.testing import Tester
78
test = Tester().test
79
bench = Tester().bench
- del Tester
-except ImportError:
- def test(*args, **kwargs):
- raise RuntimeError('Need numpy >= 1.2 for tests')
80
+ del mock, Tester
81
82
from .pkg_info import get_pkg_info as _get_pkg_info
83
0 commit comments