nicer error message if python-nose is not installed

This commit is contained in:
Dane Springmeyer 2012-08-17 09:47:47 -07:00
parent 39b057e9e4
commit 1454e3ea97

View file

@ -1,5 +1,13 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys
try:
import nose
except ImportError:
sys.stderr.write("Unable to run python tests: the third party 'nose' module is required\nTo install 'nose' do:\n\tsudo pip install nose (or on debian systems: apt-get install python-nose\n")
sys.exit(1)
from python_tests.utilities import TodoPlugin from python_tests.utilities import TodoPlugin
from nose.plugins.doctests import Doctest from nose.plugins.doctests import Doctest