class_docstr: Holder for test result information.
  
  Test results are automatically managed by the TestCase and TestSuite
  classes, and do not need to be explicitly manipulated by writers of tests.
  
  Each instance holds the total number of tests run, and collections of
  failures and errors that occurred among those test runs. The collections
  contain tuples of (testcase, exceptioninfo), where exceptioninfo is the
  formatted traceback of the error that occurred.
class_docstr_tok: ["Holder","for","test","result","information",".","Test","results","are","automatically","managed","by","the","TestCase","and","TestSuite","classes",",","and","do","not","need","to","be","explicitly","manipulated","by","writers","of","tests",".","Each","instance","holds","the","total","number","of","tests","run",",","and","collections","of","failures","and","errors","that","occurred","among","those","test","runs",".","The","collections","contain","tuples","of","(","testcase",",","exceptioninfo",")",",","where","exceptioninfo","is","the","formatted","traceback","of","the","error","that","occurred","."]
code: def _restoreStdout(self):
      if self.buffer:
          if self._mirrorOutput:
              output = sys.stdout.getvalue()
              error = sys.stderr.getvalue()
              if output:
                  if not output.endswith("\n"):
                      output += "\n"
                  self._original_stdout.write(STDOUT_LINE % output)
              if error:
                  if not error.endswith("\n"):
                      error += "\n"
                  self._original_stderr.write(STDERR_LINE % error)
  
          sys.stdout = self._original_stdout
          sys.stderr = self._original_stderr
          if self._stdout_buffer is not None:
              self._stdout_buffer.seek(0)
              self._stdout_buffer.truncate()
          if self._stderr_buffer is not None:
              self._stderr_buffer.seek(0)
              self._stderr_buffer.truncate()
  
imports: import io
  import sys
  import traceback
  from .None import util
  from functools import wraps
label_desc: Use image node_id 7 for calling the TestResult obj's underlying member method code with example usage: obj._restoreStdout() without return types