Correct documented return values
[functest-xtesting.git] / xtesting / core / behaveframework.py
index dba556f..3dc6038 100644 (file)
@@ -16,7 +16,6 @@ import os
 import time
 
 import json
-import six
 
 from behave.__main__ import main as behave_main
 
@@ -32,7 +31,7 @@ class BehaveFramework(testcase.TestCase):
     __logger = logging.getLogger(__name__)
 
     def __init__(self, **kwargs):
-        super(BehaveFramework, self).__init__(**kwargs)
+        super().__init__(**kwargs)
         self.json_file = os.path.join(self.res_dir, 'output.json')
         self.total_tests = 0
         self.pass_tests = 0
@@ -79,7 +78,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
@@ -89,13 +87,13 @@ 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)]
+        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: