changeset 303:f423a8780832

Minor tweaks to how the tests are run.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 27 Mar 2009 03:42:52 +0100
parents 827d4702a3b3
children ce676eff002b
files tests/__init__.py tests/run.py
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,3 +1,5 @@
 import sys
 import os
 sys.path.append(os.path.dirname(os.path.dirname(__file__)))
+
+from run import *
--- a/tests/run.py
+++ b/tests/run.py
@@ -45,5 +45,10 @@ def suite():
                               ])
 
 if __name__ == '__main__':
-    runner = unittest.TextTestRunner()
+    kwargs = { 'descriptions': 2 }
+    if '-v' in sys.argv:
+        kwargs['descriptions'] = 3
+        kwargs['verbosity'] = 2
+
+    runner = unittest.TextTestRunner(**kwargs)
     runner.run(suite())