pytest-embedded 1.4.1__tar.gz → 1.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/PKG-INFO +1 -1
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pytest_embedded/__init__.py +1 -1
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pytest_embedded/unity.py +1 -7
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/tests/test_base.py +30 -19
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/LICENSE +0 -0
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/README.md +0 -0
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pyproject.toml +0 -0
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pytest_embedded/app.py +0 -0
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pytest_embedded/dut.py +0 -0
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pytest_embedded/log.py +0 -0
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pytest_embedded/plugin.py +0 -0
- {pytest_embedded-1.4.1 → pytest_embedded-1.4.2}/pytest_embedded/utils.py +0 -0
|
@@ -248,8 +248,6 @@ class JunitMerger:
|
|
|
248
248
|
logging.info(f'Merging {_junit_file} to {merged_dut_junit_filepath}')
|
|
249
249
|
_junit = ET.parse(_junit_file)
|
|
250
250
|
_root = _junit.getroot()
|
|
251
|
-
for case in _root: # one level down
|
|
252
|
-
case.attrib['name'] += f' [{os.path.splitext(os.path.basename(_junit_file))[0]}]'
|
|
253
251
|
|
|
254
252
|
if _data is None:
|
|
255
253
|
_data = _junit
|
|
@@ -273,11 +271,7 @@ class JunitMerger:
|
|
|
273
271
|
elif _junit_files[0] != merged_dut_junit_filepath:
|
|
274
272
|
_junit_file = _junit_files[0]
|
|
275
273
|
logging.info(f'Rename {_junit_file} to {merged_dut_junit_filepath}')
|
|
276
|
-
|
|
277
|
-
_root = _junit.getroot()
|
|
278
|
-
for case in _root: # one level down
|
|
279
|
-
case.attrib['name'] += f' [{os.path.splitext(os.path.basename(_junit_file))[0]}]'
|
|
280
|
-
_junit.write(merged_dut_junit_filepath)
|
|
274
|
+
os.rename(_junit_file, merged_dut_junit_filepath)
|
|
281
275
|
|
|
282
276
|
_merged_multi_dut_junit_files.append(merged_dut_junit_filepath)
|
|
283
277
|
|
|
@@ -419,19 +419,32 @@ def test_expect_unity_test_output_multi_dut(testdir):
|
|
|
419
419
|
assert junit_report.attrib['skipped'] == '0'
|
|
420
420
|
assert junit_report.attrib['tests'] == '12'
|
|
421
421
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
]
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
assert
|
|
422
|
+
assert junit_report[0].get('name') == 'test_case'
|
|
423
|
+
assert junit_report[0].find('failure') is not None
|
|
424
|
+
assert junit_report[1].get('name') == 'test_case_2'
|
|
425
|
+
assert junit_report[1].find('failure') is not None
|
|
426
|
+
assert junit_report[2].get('name') == 'test case 3'
|
|
427
|
+
assert junit_report[2].find('failure') is None
|
|
428
|
+
assert junit_report[3].get('name') == 'test case 4'
|
|
429
|
+
assert junit_report[3].find('failure') is not None
|
|
430
|
+
|
|
431
|
+
assert junit_report[4].get('name') == 'test_case'
|
|
432
|
+
assert junit_report[4].find('failure') is not None
|
|
433
|
+
assert junit_report[5].get('name') == 'test_case_2'
|
|
434
|
+
assert junit_report[5].find('failure') is not None
|
|
435
|
+
assert junit_report[6].get('name') == 'test case 3'
|
|
436
|
+
assert junit_report[6].find('failure') is None
|
|
437
|
+
assert junit_report[7].get('name') == 'test case 4'
|
|
438
|
+
assert junit_report[7].find('failure') is not None
|
|
439
|
+
|
|
440
|
+
assert junit_report[8].get('name') == 'test_case'
|
|
441
|
+
assert junit_report[8].find('failure') is not None
|
|
442
|
+
assert junit_report[9].get('name') == 'test_case_2'
|
|
443
|
+
assert junit_report[9].find('failure') is not None
|
|
444
|
+
assert junit_report[10].get('name') == 'test case 3'
|
|
445
|
+
assert junit_report[10].find('failure') is None
|
|
446
|
+
assert junit_report[11].get('name') == 'test case 4'
|
|
447
|
+
assert junit_report[11].find('failure') is not None
|
|
435
448
|
|
|
436
449
|
|
|
437
450
|
def test_expect_unity_test_output_multi_dut_with_illegal_chars(testdir):
|
|
@@ -472,13 +485,11 @@ def test_expect_unity_test_output_multi_dut_with_illegal_chars(testdir):
|
|
|
472
485
|
assert junit_report.attrib['skipped'] == '0'
|
|
473
486
|
assert junit_report.attrib['tests'] == '2'
|
|
474
487
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
]
|
|
479
|
-
all_case_names = [item.attrib['name'] for item in junit_report]
|
|
488
|
+
assert junit_report[0].get('name') == 'test_case'
|
|
489
|
+
assert junit_report[0].find('failure') is not None
|
|
490
|
+
assert junit_report[1].get('name') == 'test_case'
|
|
491
|
+
assert junit_report[1].find('failure') is not None
|
|
480
492
|
|
|
481
|
-
assert sorted(required_names) == sorted(all_case_names)
|
|
482
493
|
|
|
483
494
|
|
|
484
495
|
def test_duplicate_stdout_popen(testdir):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|