From e2a7ac290649fe12228604876fdd63976734bec5 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Fri, 11 Jun 2021 15:09:25 +0200 Subject: Fix tag logics in behave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unit tests will be fully rewritten in a second change (out of this bugfix). Co-Authored-By: Ugur Caglar Kilic Change-Id: I6413fbcecdf44dbfe9c978045f4b1d43ca0de2ec Signed-off-by: Cédric Ollivier --- xtesting/tests/unit/core/test_behaveframework.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'xtesting/tests/unit') diff --git a/xtesting/tests/unit/core/test_behaveframework.py b/xtesting/tests/unit/core/test_behaveframework.py index 72fa6f29..7cfcdec7 100644 --- a/xtesting/tests/unit/core/test_behaveframework.py +++ b/xtesting/tests/unit/core/test_behaveframework.py @@ -84,7 +84,7 @@ class RunTesting(unittest.TestCase): # pylint: disable=missing-docstring suites = ["foo"] - tags = [] + tags = ["bar"] def setUp(self): self.test = behaveframework.BehaveFramework( @@ -118,11 +118,12 @@ class RunTesting(unittest.TestCase): 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), '--format=behave_html_formatter:HTMLFormatter', - '--outfile={}'.format(html_file)] + '--outfile={}'.format(html_file), + '--tags='+','.join(self.tags)] args_list.append('foo') args[0].assert_called_once_with(args_list) mock_method.assert_called_once_with() @@ -150,11 +151,12 @@ class RunTesting(unittest.TestCase): 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), '--format=behave_html_formatter:HTMLFormatter', - '--outfile={}'.format(html_file)] + '--outfile={}'.format(html_file), + '--tags='+','.join(self.tags)] if console: args_list += ['--format=pretty', '--outfile=-'] args_list.append('foo') -- cgit 1.2.3-korg