"""
try:
suites = kwargs["suites"]
- tags = kwargs.get("tags", [])
except KeyError:
self.__logger.exception("Mandatory args were not passed")
return self.EX_RUN_ERROR
except Exception: # pylint: disable=broad-except
self.__logger.exception("Cannot create %s", self.res_dir)
return self.EX_RUN_ERROR
- config = ['--tags='+','.join(tags),
- '--junit', '--junit-directory={}'.format(self.res_dir),
+ config = ['--junit', '--junit-directory={}'.format(self.res_dir),
'--format=json', '--outfile={}'.format(self.json_file)]
if six.PY3:
html_file = os.path.join(self.res_dir, 'output.html')
config += ['--format=behave_html_formatter:HTMLFormatter',
'--outfile={}'.format(html_file)]
+ if kwargs.get("tags", False):
+ config += ['--tags='+','.join(kwargs.get("tags", []))]
if kwargs.get("console", False):
config += ['--format=pretty', '--outfile=-']
for feature in suites:
# pylint: disable=missing-docstring
suites = ["foo"]
- tags = []
+ tags = ["bar"]
def setUp(self):
self.test = behaveframework.BehaveFramework(
self.test.EX_OK)
html_file = os.path.join(self.test.res_dir, 'output.html')
args_list = [
- '--tags=', '--junit',
+ '--junit',
'--junit-directory={}'.format(self.test.res_dir),
'--format=json', '--outfile={}'.format(self.test.json_file)]
if six.PY3:
args_list += [
'--format=behave_html_formatter:HTMLFormatter',
'--outfile={}'.format(html_file)]
+ args_list.append('--tags='+','.join(self.tags))
args_list.append('foo')
args[0].assert_called_once_with(args_list)
mock_method.assert_called_once_with()
status)
html_file = os.path.join(self.test.res_dir, 'output.html')
args_list = [
- '--tags=', '--junit',
+ '--junit',
'--junit-directory={}'.format(self.test.res_dir),
'--format=json', '--outfile={}'.format(self.test.json_file)]
if six.PY3:
args_list += [
'--format=behave_html_formatter:HTMLFormatter',
'--outfile={}'.format(html_file)]
+ args_list.append('--tags='+','.join(self.tags))
if console:
args_list += ['--format=pretty', '--outfile=-']
args_list.append('foo')