@@ -457,26 +457,33 @@ def test_expect_unity_test_output_multi_dut_with_illegal_chars(testdir):
457457 import pytest
458458 import inspect
459459
460- output = inspect.cleandoc(
460+ output1 = inspect.cleandoc(
461461 u'''
462- TEST(group, test_case )foo.c:100::FAIL:Expected 2 \x00 was 1
462+ TEST(group, test_case_1 )foo.c:100::FAIL:Expected 2 \x00 was 1
463463 -------------------
464464 4 Tests 3 Failures 0 Ignored
465465 FAIL
466466 ''')
467+ output2 = inspect.cleandoc(
468+ u'''
469+ TEST(group, test_case_2)foo.c:100::FAIL:Expected 2 \x00 was 1
470+ -------------------
471+ 5 Tests 2 Failures 0 Ignored
472+ FAIL
473+ ''')
467474
468475 @pytest.mark.parametrize('count', [2], indirect=True)
469476 def test_expect_unity_test_output_multi_dut_with_illegal_chars(dut):
470477 dut_0 = dut[0]
471478 dut_1 = dut[1]
472479
473- dut_0.write(output )
474- dut_1.write(output )
480+ dut_0.write(output1 )
481+ dut_1.write(output2 )
475482 dut_0.expect_unity_test_output()
476483 dut_1.expect_unity_test_output()
477484 """ )
478485
479- result = testdir .runpytest ('--junitxml' , 'report.xml' )
486+ result = testdir .runpytest ('--app-path' , f' { testdir . tmpdir } /foo| { testdir . tmpdir } /bar' , '-- junitxml' , 'report.xml' )
480487
481488 try :
482489 result .assert_outcomes (failed = 1 )
@@ -490,10 +497,12 @@ def test_expect_unity_test_output_multi_dut_with_illegal_chars(dut):
490497 assert junit_report .attrib ['skipped' ] == '0'
491498 assert junit_report .attrib ['tests' ] == '2'
492499
493- assert junit_report [0 ].get ('name' ) == 'test_case '
500+ assert junit_report [0 ].get ('name' ) == 'test_case_1 '
494501 assert junit_report [0 ].find ('failure' ) is not None
495- assert junit_report [1 ].get ('name' ) == 'test_case'
502+ assert junit_report [0 ].get ('app_path' ) == f'{ testdir .tmpdir } /foo'
503+ assert junit_report [1 ].get ('name' ) == 'test_case_2'
496504 assert junit_report [1 ].find ('failure' ) is not None
505+ assert junit_report [1 ].get ('app_path' ) == f'{ testdir .tmpdir } /bar'
497506
498507
499508def test_duplicate_stdout_popen (testdir ):
0 commit comments