Read and return the captured output so far, resetting the internal buffer. :returns: The captured content as a namedtuple with ``out`` and ``err`` string attributes.
(self)
| 831 | self._capture = None |
| 832 | |
| 833 | def readouterr(self) -> CaptureResult[AnyStr]: |
| 834 | """Read and return the captured output so far, resetting the internal |
| 835 | buffer. |
| 836 | |
| 837 | :returns: |
| 838 | The captured content as a namedtuple with ``out`` and ``err`` |
| 839 | string attributes. |
| 840 | """ |
| 841 | captured_out, captured_err = self._captured_out, self._captured_err |
| 842 | if self._capture is not None: |
| 843 | out, err = self._capture.readouterr() |
| 844 | captured_out += out |
| 845 | captured_err += err |
| 846 | self._captured_out = self.captureclass.EMPTY_BUFFER |
| 847 | self._captured_err = self.captureclass.EMPTY_BUFFER |
| 848 | return CaptureResult(captured_out, captured_err) |
| 849 | |
| 850 | def _suspend(self) -> None: |
| 851 | """Suspend this fixture's own capturing temporarily.""" |
nothing calls this directly
no test coverage detected