diff --git a/pytest-embedded/pytest_embedded/unity.py b/pytest-embedded/pytest_embedded/unity.py index b4f13961..76038c05 100644 --- a/pytest-embedded/pytest_embedded/unity.py +++ b/pytest-embedded/pytest_embedded/unity.py @@ -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 @@ -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)