diff options
author | gbrandl <devnull@localhost> | 2009-09-15 12:12:20 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2009-09-15 12:12:20 +0200 |
commit | 2cdd7e197d4d69b85e2f1bba4a4da612f06a63b6 (patch) | |
tree | 1b8a4a53c1a455a14e073a6355e0f9b32b40cc64 /tests/run.py | |
parent | 78409982f5db8b2ea40a31124caa394ac2996f70 (diff) | |
download | pygments-2cdd7e197d4d69b85e2f1bba4a4da612f06a63b6.tar.gz |
Make sure test suite runs the right Pygments.
Diffstat (limited to 'tests/run.py')
-rw-r--r-- | tests/run.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/run.py b/tests/run.py index 0b5fd457..8652042d 100644 --- a/tests/run.py +++ b/tests/run.py @@ -26,7 +26,18 @@ if sys.version_info >= (3,): try: import nose except ImportError: - print ("nose is required to run the test suites") + print ('nose is required to run the Pygments test suite') sys.exit(1) +try: + # make sure the current source is first on sys.path + sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + import pygments +except ImportError, err: + print ('Cannot find Pygments to test: %s' % err) + sys.exit(1) +else: + print ('Pygments %s test suite running (Python %s)...' % + (pygments.__version__, sys.version.split()[0])) + nose.main() |