[Neo-report] r2178 gregory - /trunk/tools/runner

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jun 18 16:42:57 CEST 2010


Author: gregory
Date: Fri Jun 18 16:42:53 2010
New Revision: 2178

Log:
Intercept KeyboardInterrupt in test runner to display partial result.

Modified:
    trunk/tools/runner

Modified: trunk/tools/runner
==============================================================================
--- trunk/tools/runner [iso-8859-1] (original)
+++ trunk/tools/runner [iso-8859-1] Fri Jun 18 16:42:53 2010
@@ -355,12 +355,15 @@ if __name__ == "__main__":
 
     # run requested tests
     runner = NeoTestRunner()
-    if options.unit:
-        runner.run('Unit tests', UNIT_TEST_MODULES)
-    if options.functional:
-        runner.run('Functional tests', FUNC_TEST_MODULES)
-    if options.zodb:
-        runner.run('ZODB tests', ZODB_TEST_MODULES)
+    try:
+        if options.unit:
+            runner.run('Unit tests', UNIT_TEST_MODULES)
+        if options.functional:
+            runner.run('Functional tests', FUNC_TEST_MODULES)
+        if options.zodb:
+            runner.run('ZODB tests', ZODB_TEST_MODULES)
+    except KeyboardInterrupt:
+        options.sender = False
 
     # build report
     runner.build()





More information about the Neo-report mailing list