Get detailed information about all failures
(self)
| 48 | return "\n".join(summary) |
| 49 | |
| 50 | def get_detailed_failure_info(self) -> str: |
| 51 | """Get detailed information about all failures""" |
| 52 | if not self.failures: |
| 53 | return self.message |
| 54 | |
| 55 | details = [self.message] |
| 56 | details.append(f"\n{'=' * 50}") |
| 57 | details.append("DETAILED FAILURE INFORMATION") |
| 58 | details.append(f"{'=' * 50}") |
| 59 | |
| 60 | for i, failure in enumerate(self.failures, 1): |
| 61 | cmd_str: str = ( |
| 62 | subprocess.list2cmdline(failure.command) |
| 63 | if isinstance(failure.command, list) |
| 64 | else failure.command |
| 65 | ) |
| 66 | assert isinstance(cmd_str, str) |
| 67 | details.append(f"\n{i}. {failure.test_name}") |
| 68 | details.append(f" Command: {cmd_str}") |
| 69 | details.append(f" Error Type: {failure.error_type}") |
| 70 | details.append(f" Exit Code: {failure.return_code}") |
| 71 | details.append(" Output:") |
| 72 | # Indent the output |
| 73 | for line in failure.output.split("\n"): |
| 74 | details.append(f" {line}") |
| 75 | |
| 76 | return "\n".join(details) |
| 77 | |
| 78 | |
| 79 | class CompilationFailedException(FastLEDTestException): |
no test coverage detected