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)
| 958 | self._capture = None |
| 959 | |
| 960 | def readouterr(self) -> CaptureResult[AnyStr]: |
| 961 | """Read and return the captured output so far, resetting the internal |
| 962 | buffer. |
| 963 | |
| 964 | :returns: |
| 965 | The captured content as a namedtuple with ``out`` and ``err`` |
| 966 | string attributes. |
| 967 | """ |
| 968 | captured_out, captured_err = self._captured_out, self._captured_err |
| 969 | if self._capture is not None: |
| 970 | out, err = self._capture.readouterr() |
| 971 | captured_out += out |
| 972 | captured_err += err |
| 973 | self._captured_out = self.captureclass.EMPTY_BUFFER |
| 974 | self._captured_err = self.captureclass.EMPTY_BUFFER |
| 975 | return CaptureResult(captured_out, captured_err) |
| 976 | |
| 977 | def _suspend(self) -> None: |
| 978 | """Suspend this fixture's own capturing temporarily.""" |