Commit 1f24f2b6 authored by Sebastien Robin's avatar Sebastien Robin

accept string as parameters in runLiveTest

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39463 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 42224db7
...@@ -1203,7 +1203,7 @@ def initialize( context ): ...@@ -1203,7 +1203,7 @@ def initialize( context ):
return result return result
security.declareProtected(Permissions.ManagePortal, 'runLiveTest') 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): verbose=False):
""" """
Launch live tests Launch live tests
...@@ -1214,6 +1214,13 @@ def initialize( context ): ...@@ -1214,6 +1214,13 @@ def initialize( context ):
debug=boolean Invoke debugger on errors / failures. debug=boolean Invoke debugger on errors / failures.
verbose=boolean Display more informations when running tests 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') path = os.path.join(getConfiguration().instancehome, 'tests')
verbosity = verbose and 2 or 1 verbosity = verbose and 2 or 1
instance_home = getConfiguration().instancehome instance_home = getConfiguration().instancehome
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment