'Return a formatted count of tests status results.'

def _getSummary(self):

    summaries = []
    for stat in ('skips', 'expectedFailures', 'failures', 'errors', 'unexpectedSuccesses'):
        num = len(getattr(self, stat))
        if num:
            summaries.append(('%s=%d' % (stat, num)))
    if self.successes:
        summaries.append(('successes=%d' % (self.successes,)))
    summary = ((summaries and (('    (' + ',    '.join(summaries)) + ')')) or '')
    return summary
