A test that failed during a test run.
| 906 | |
| 907 | @dataclass |
| 908 | class FailedTestEntry: |
| 909 | """A test that failed during a test run.""" |
| 910 | |
| 911 | name: str |
| 912 | category: str # "unit" or "example" |
| 913 | |
| 914 | @property |
| 915 | def clean_name(self) -> str: |
| 916 | """Strip suite prefix (e.g., 'fastled:test_name' -> 'test_name').""" |
| 917 | return self.name.split(":")[-1] if ":" in self.name else self.name |
| 918 | |
| 919 | @property |
| 920 | def rerun_cmd(self) -> str: |
| 921 | if self.category == "example": |
| 922 | return f"bash test {self.clean_name} --examples" |
| 923 | return f"bash test {self.clean_name} --cpp" |
| 924 | |
| 925 | @property |
| 926 | def debug_cmd(self) -> str: |
| 927 | if self.category == "example": |
| 928 | return f"bash test {self.clean_name} --examples --debug" |
| 929 | return f"bash test {self.clean_name} --debug" |
| 930 | |
| 931 | |
| 932 | def _format_failure_summary( |