Extract the last line of output from a process.
(self, process: RunningProcess)
| 481 | ) |
| 482 | |
| 483 | def _get_last_output_line(self, process: RunningProcess) -> Optional[str]: |
| 484 | """Extract the last line of output from a process.""" |
| 485 | # Try to get from cached last output first |
| 486 | cached = self._process_last_output.get(process) |
| 487 | if cached: |
| 488 | return cached |
| 489 | |
| 490 | # Fall back to stdout output |
| 491 | lines = _get_output_lines(process) |
| 492 | if lines: |
| 493 | last_line = lines[-1].strip() |
| 494 | self._process_last_output[process] = last_line |
| 495 | return last_line |
| 496 | |
| 497 | return None |
| 498 | |
| 499 | def _track_process_start(self, process: RunningProcess) -> None: |
| 500 | """Record when a process starts for timing calculations.""" |
no test coverage detected