Skip to content

Commit

Permalink
fix: remove testcase name postfix
Browse files Browse the repository at this point in the history
  • Loading branch information
horw committed Nov 30, 2023
1 parent 720319a commit 7d12ea6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pytest-embedded/pytest_embedded/unity.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ def merge(self, junit_files: List[str]):
logging.info(f'Merging {_junit_file} to {merged_dut_junit_filepath}')
_junit = ET.parse(_junit_file)
_root = _junit.getroot()
for case in _root: # one level down
case.attrib['name'] += f' [{os.path.splitext(os.path.basename(_junit_file))[0]}]'

if _data is None:
_data = _junit
Expand All @@ -273,11 +271,7 @@ def merge(self, junit_files: List[str]):
elif _junit_files[0] != merged_dut_junit_filepath:
_junit_file = _junit_files[0]
logging.info(f'Rename {_junit_file} to {merged_dut_junit_filepath}')
_junit = ET.parse(_junit_file)
_root = _junit.getroot()
for case in _root: # one level down
case.attrib['name'] += f' [{os.path.splitext(os.path.basename(_junit_file))[0]}]'
_junit.write(merged_dut_junit_filepath)
os.rename(_junit_file, merged_dut_junit_filepath)

_merged_multi_dut_junit_files.append(merged_dut_junit_filepath)

Expand Down

0 comments on commit 7d12ea6

Please sign in to comment.