def readouterr(self):
captured_out, captured_err = self._captured_out, self._captured_err<EOL>if self._capture is not None:<EOL><INDENT>out, err = self._capture.readouterr()<EOL>captured_out += out<EOL>captured_err += err<EOL><DEDENT>self._captured_out = self.captureclass.EMPTY_BUFFER<EOL>self._captured_err = self.captureclass.EMPTY_BUFFER<EOL>return CaptureResult(captured_out, captured_err)<EOL>
Read and return the captured output so far, resetting the internal buffer.

        :return: captured content as a namedtuple with ``out`` and ``err`` string attributes