diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-06-11 15:09:25 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-08-19 14:46:30 +0200 |
commit | 980453e9fd0f188437dc4c691f1f88da8539827f (patch) | |
tree | 0252b519aeaf22cb3189e3d70ce422650c3145c5 /xtesting/core | |
parent | 0327d9a2d8cab091f31b9c8435ef3b9e56df8e06 (diff) |
Fix tag logics in behave
The unit tests will be fully rewritten in a second change (out of this
bugfix).
Co-Authored-By: Ugur Caglar Kilic <ugur.caglar.kilic@oracle.com>
Change-Id: I6413fbcecdf44dbfe9c978045f4b1d43ca0de2ec
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit e2a7ac290649fe12228604876fdd63976734bec5)
(cherry picked from commit 261536179b363e0260e4e0068e4471bfb7c63b60)
Diffstat (limited to 'xtesting/core')
-rw-r--r-- | xtesting/core/behaveframework.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xtesting/core/behaveframework.py b/xtesting/core/behaveframework.py index dacda27d..2ee54d03 100644 --- a/xtesting/core/behaveframework.py +++ b/xtesting/core/behaveframework.py @@ -80,7 +80,6 @@ class BehaveFramework(testcase.TestCase): """ try: suites = kwargs["suites"] - tags = kwargs.get("tags", []) except KeyError: self.__logger.exception("Mandatory args were not passed") return self.EX_RUN_ERROR @@ -90,13 +89,14 @@ class BehaveFramework(testcase.TestCase): 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: |