[Erp5-report] r39463 seb - /erp5/trunk/products/ERP5Type/Tool/ClassTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 22 09:09:01 CEST 2010


Author: seb
Date: Fri Oct 22 09:08:57 2010
New Revision: 39463

URL: http://svn.erp5.org?rev=39463&view=rev
Log:
accept string as parameters in runLiveTest

Modified:
    erp5/trunk/products/ERP5Type/Tool/ClassTool.py

Modified: erp5/trunk/products/ERP5Type/Tool/ClassTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/ClassTool.py?rev=39463&r1=39462&r2=39463&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] Fri Oct 22 09:08:57 2010
@@ -1203,7 +1203,7 @@ def initialize( context ):
         return result
 
       security.declareProtected(Permissions.ManagePortal, 'runLiveTest')
-      def runLiveTest(self, test_list=[], run_only=None, debug=None,
+      def runLiveTest(self, test_list=None, run_only=None, debug=None,
                       verbose=False):
         """
         Launch live tests
@@ -1214,6 +1214,13 @@ def initialize( context ):
         debug=boolean        Invoke debugger on errors / failures.
         verbose=boolean      Display more informations when running tests
         """
+        # Allow having strings for verbose and debug
+        verbose = int(verbose) and True or False
+        debug = int(debug) and True or False
+        if test_list is None:
+          test_list = []
+        elif isinstance(test_list, str):
+          test_list = test_list.split(',')
         path = os.path.join(getConfiguration().instancehome, 'tests')
         verbosity = verbose and 2 or 1
         instance_home = getConfiguration().instancehome




More information about the Erp5-report mailing list