'Run the given test case or test suite.'

def run(self, test):

    result = self._makeResult()
    startTime = time.time()
    test(result)
    stopTime = time.time()
    timeTaken = (stopTime - startTime)
    result.printErrors()
    self.stream.writeln(result.separator2)
    run = result.testsRun
    self.stream.writeln(('Ran    %d    test%s    in    %.3fs' % (run, (((run != 1) and 's') or ''), timeTaken)))
    self.stream.writeln()
    results = map(len, (result.expectedFailures, result.unexpectedSuccesses, result.skipped))
    (expectedFails, unexpectedSuccesses, skipped) = results
    infos = []
    if (not result.wasSuccessful()):
        self.stream.write('FAILED')
        (failed, errored) = map(len, (result.failures, result.errors))
        if failed:
            infos.append(('failures=%d' % failed))
        if errored:
            infos.append(('errors=%d' % errored))
    else:
        self.stream.write('OK')
    if skipped:
        infos.append(('skipped=%d' % skipped))
    if expectedFails:
        infos.append(('expected    failures=%d' % expectedFails))
    if unexpectedSuccesses:
        infos.append(('unexpected    successes=%d' % unexpectedSuccesses))
    if infos:
        self.stream.writeln(('    (%s)' % (',    '.join(infos),)))
    else:
        self.stream.write('\n')
    return result
