MCPcopy Create free account
hub / github.com/FastLED/FastLED / extract_failed_tests

Function extract_failed_tests

ci/hooks/check-on-stop.py:94–105  ·  view source on GitHub ↗

Extract failed test names from test runner output.

(output: str)

Source from the content-addressed store, hash-verified

92
93
94def extract_failed_tests(output: str) -> list[FailedTest]:
95 """Extract failed test names from test runner output."""
96 import re
97
98 failed: list[FailedTest] = []
99 # Match lines like " test_name | unit | bash test test_name --cpp"
100 # from the FAILED TESTS SUMMARY table
101 for line in output.splitlines():
102 m = re.match(r"^\s+(\S+)\s+\|\s+(unit|example)\s+\|", line)
103 if m:
104 failed.append(FailedTest(name=m.group(1), category=m.group(2)))
105 return failed
106
107
108def report_failure(label: str, result: subprocess.CompletedProcess[str]) -> None:

Callers 1

mainFunction · 0.85

Calls 2

FailedTestClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected