From 1454e3ea972764b95b3034f4848ccdab2a755f99 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Aug 2012 09:47:47 -0700 Subject: [PATCH] nicer error message if python-nose is not installed --- tests/run_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/run_tests.py b/tests/run_tests.py index 479a2830a..24db67b47 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -1,5 +1,13 @@ #!/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 nose.plugins.doctests import Doctest