| 25 | |
| 26 | |
| 27 | class Capturing(list): |
| 28 | def __enter__(self): |
| 29 | self._stdout = sys.stdout |
| 30 | sys.stdout = self._stringio = StringIO() |
| 31 | return self |
| 32 | |
| 33 | def __exit__(self, *args): |
| 34 | self.extend(self._stringio.getvalue().splitlines()) |
| 35 | del self._stringio |
| 36 | sys.stdout = self._stdout |
| 37 | |
| 38 | |
| 39 | def parse_lcov(outputs: List[str], func: Callable, mode: str = "branch"): |
no outgoing calls