'Replace the stdout and stderr streams with string-based streams
in order to capture the tests\' output.'

def _patch_standard_output(self):

    if (not self.output_patched):
        (self.old_stdout, self.old_stderr) = (sys.stdout, sys.stderr)
        self.output_patched = True
    (sys.stdout, sys.stderr) = (self.stdout, self.stderr) = (StringIO(), StringIO())
