From 1f24f2b6bf1c361816782cb09bfa45872e8952ea Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Fri, 22 Oct 2010 07:08:57 +0000
Subject: [PATCH] accept string as parameters in runLiveTest

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39463 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Tool/ClassTool.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/Tool/ClassTool.py b/product/ERP5Type/Tool/ClassTool.py
index cc09103d09..42608cd720 100644
--- a/product/ERP5Type/Tool/ClassTool.py
+++ b/product/ERP5Type/Tool/ClassTool.py
@@ -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
-- 
2.30.9