tests/runAll.py
changeset 2978 1e68f6a61dfe
parent 2967 ea62529bd1df
child 2984 c63f149d55aa
--- a/tests/runAll.py	Wed Sep 10 17:57:51 2008 +0000
+++ b/tests/runAll.py	Wed Sep 10 22:39:57 2008 +0000
@@ -5,7 +5,18 @@
 """
 __version__=''' $Id$ '''
 import os, glob, sys, string, traceback, unittest
-from tests.utils import GlobDirectoryWalker, outputfile, printLocation
+
+#we need to ensure 'tests' is on the path.  It will be if you
+#run 'setup.py tests', but won't be if you CD into the tests
+#directory and run this directly
+try:
+    from tests.utils import GlobDirectoryWalker, outputfile, printLocation
+except ImportError:
+    directoryAboveMe = os.path.dirname(os.getcwd())
+    sys.path.insert(0, directoryAboveMe)
+    from tests.utils import GlobDirectoryWalker, outputfile, printLocation
+    
+    
 
 def makeSuite(folder, exclude=[],nonImportable=[],pattern='test_*.py'):
     "Build a test suite of all available test files."