Process a line of output and convert it to structured test results
(self, line: str, process_name: str)
| 384 | self.header_printed = False |
| 385 | |
| 386 | def handle_output_line(self, line: str, process_name: str) -> None: |
| 387 | """Process a line of output and convert it to structured test results""" |
| 388 | # Start new test suite if command changes |
| 389 | if process_name != self.current_command: |
| 390 | if self.current_command: |
| 391 | self.formatter.end_suite() |
| 392 | self.formatter.start_suite(process_name) |
| 393 | self.current_command = process_name |
| 394 | self.header_printed = True |
| 395 | self.formatter.add_result( |
| 396 | TestResult( |
| 397 | type=TestResultType.INFO, |
| 398 | message=f"=== [{process_name}] ===", |
| 399 | test_name=process_name, |
| 400 | ) |
| 401 | ) |
| 402 | |
| 403 | # Convert line to appropriate test result |
| 404 | result = self._parse_line_to_result(line, process_name) |
| 405 | if result: |
| 406 | self.formatter.add_result(result) |
| 407 | |
| 408 | def _parse_line_to_result( |
| 409 | self, line: str, process_name: str |
nothing calls this directly
no test coverage detected