@@ -95,7 +95,7 @@ def test_list_tests(clirunner, validate_cliresult, tmp_path: Path):
9595 assert len (json_report ["test_suites" ]) == 6
9696
9797
98- def test_group_and_custom_runner (clirunner , validate_cliresult , tmp_path : Path ):
98+ def test_group_and_custom_runner (clirunner , tmp_path : Path ):
9999 project_dir = tmp_path / "project"
100100 project_dir .mkdir ()
101101 (project_dir / "platformio.ini" ).write_text ("""
@@ -167,22 +167,27 @@ def teardown(self):
167167 // clean stuff up here
168168}
169169
170- void dummy_test (void) {
170+ void dummy_test_passed (void) {
171171 TEST_ASSERT_EQUAL(1, TEST_ONE);
172172}
173173
174+ void dummy_test_failed(void) {
175+ TEST_ASSERT_LESS_THAN(10, 15);
176+ }
177+
174178int main() {
175179 UNITY_BEGIN();
176- RUN_TEST(dummy_test);
180+ RUN_TEST(dummy_test_passed);
181+ RUN_TEST(dummy_test_failed);
177182 UNITY_END();
178183}
179184 """ )
180185 result = clirunner .invoke (
181186 pio_test_cmd ,
182187 ["-d" , str (project_dir ), "-e" , "native" , "--verbose" ],
183188 )
184- validate_cliresult ( result )
185- assert "1 Tests 0 Failures 0 Ignored" in result .output
189+ assert result . exit_code != 0
190+ assert "2 Tests 1 Failures 0 Ignored" in result .output
186191 assert "Called from my_extra_fun" in result .output
187192 assert "CustomTestRunner::TearDown called" in result .output
188193 assert "Disabled test suite" not in result .output
0 commit comments