From 071e13ef6188733941bbbcf9bd126950b4c017b0 Mon Sep 17 00:00:00 2001 From: Scott Poore Date: Oct 19 2018 20:15:23 +0000 Subject: stripping last space off end of tc_name tc_name in some cases was getting a space added to the end when no params were set. This caused test case names to end in space which was incorrect. Signed-off-by: Scott Poore --- diff --git a/pytest_modifyjunit/plugin.py b/pytest_modifyjunit/plugin.py index a7772d7..d8c7c7f 100644 --- a/pytest_modifyjunit/plugin.py +++ b/pytest_modifyjunit/plugin.py @@ -98,7 +98,7 @@ class ModifyJunit(object): tc_title = ' '.join([tc.strip() for tc in doc_list[tc_start: tc_end]]) else: tc_title = ''.join(doc_list[tc_start]) - tc_name = re.sub("^.[T|t]itle\s*:\s*", "", tc_title + ' ' + test_params) + tc_name = re.sub("^.[T|t]itle\s*:\s*", "", tc_title + ' ' + test_params).strip() rep.nodeid = '::'.join(rep.nodeid.split('::')[0:-1]) + \ '::' + tc_name if 'call' in rep.when: diff --git a/setup.py b/setup.py index 4c08ce8..a368014 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ with io.open('README.rst', 'rt', encoding='utf-8') as f: setup_args = dict( name = "pytest-modifyjunit", - version = "1.3", + version = "1.4", description = "Utility for adding additional properties to junit xml for IDM QE", long_description = readme_contents, license = "GPL",