| 445 | |
| 446 | |
| 447 | class SysCapture(SysCaptureBase[str]): |
| 448 | EMPTY_BUFFER = "" |
| 449 | |
| 450 | def snap(self) -> str: |
| 451 | self._assert_state("snap", ("started", "suspended")) |
| 452 | assert isinstance(self.tmpfile, CaptureIO) |
| 453 | res = self.tmpfile.getvalue() |
| 454 | self.tmpfile.seek(0) |
| 455 | self.tmpfile.truncate() |
| 456 | return res |
| 457 | |
| 458 | def writeorg(self, data: str) -> None: |
| 459 | self._assert_state("writeorg", ("started", "suspended")) |
| 460 | self._old.write(data) |
| 461 | self._old.flush() |
| 462 | |
| 463 | |
| 464 | class FDCaptureBase(CaptureBase[AnyStr]): |
no outgoing calls
no test coverage detected