Fix behavior of skimage.doctest when nose is not found

This commit is contained in:
Steven Silvester
2015-02-16 21:33:09 -06:00
parent a4e4612ad7
commit 23b643ae55
+1 -6
View File
@@ -75,17 +75,12 @@ else:
try:
_imp.find_module('nose')
except ImportError:
def _test(verbose=False):
def _test(doctest=False, verbose=False):
"""This would run all unit tests, but nose couldn't be
imported so the test suite can not run.
"""
raise ImportError("Could not load nose. Unit tests not available.")
def _doctest(verbose=False):
"""This would run all doc tests, but nose couldn't be
imported so the test suite can not run.
"""
raise ImportError("Could not load nose. Doctests not available.")
else:
def _test(doctest=False, verbose=False):
"""Run all unit tests."""