# Path: stestr/colorizer.py
# class AnsiColorizer:
# class NullColorizer:
#     def __init__(self, stream):
#     def supported(cls, stream=sys.stdout):
#     def write(self, text, color):
#     def __init__(self, stream):
#     def supported(cls, stream=sys.stdout):
#     def write(self, text, color):
# 
# Path: stestr/results.py
# def wasSuccessful(summary):
#     def __init__(self):
#     def startTestRun(self):
#     def status(self, *args, **kwargs):
#     def get_num_failures(self):
#     def get_time_taken(self):
#     def __init__(self, byte_stream):
#     def status(self, test_id=None, test_status=None, test_tags=None,
#                runnable=True, file_name=None, file_bytes=None, eof=False,
#                mime_type=None, route_code=None, timestamp=None):
#     def __init__(self, get_id, stream, previous_run=None):
#     def _format_error(self, label, test, error_text, test_tags=None):
#     def status(self, **kwargs):
#     def _get_previous_summary(self):
#     def _output_summary(self, run_id):
#     def startTestRun(self):
#     def stopTestRun(self):
#     def get_summary(self):
# class SummarizingResult(testtools.StreamSummary):
# class CatFiles(testtools.StreamResult):
# class CLITestResult(testtools.StreamResult):


import argparse
import functools
import os
import re
import sys
import pbr.version
import subunit
import testtools
    import anydbm as dbm
    import dbm
from stestr import colorizer
from stestr import results

        if avg_runtime and avg_runtime > 0:
            run_time = float(run_time.rstrip('s'))
            perc_diff = ((run_time - avg_runtime) / avg_runtime) * 100
            return perc_diff
    return False


def show_outcome(stream, test, print_failures=False, failonly=False,
                 enable_diff=False, threshold='0', abbreviate=False,
                 enable_color=False, suppress_attachments=False,
                 all_attachments=False, show_binary_attachments=True):
    global RESULTS
    status = test['status']
    # TODO(sdague): ask lifeless why on this?
    if status == 'exists':
        return

    worker = find_worker(test)
    name = cleanup_test_name(test['id'])
    duration = get_duration(test['timestamps'])

    if worker not in RESULTS:
        RESULTS[worker] = []
    RESULTS[worker].append(test)

    # don't count the end of the return code as a fail
    if name == 'process-returncode':
        return


# Path: stestr/colorizer.py
# class AnsiColorizer:
# class NullColorizer:
#     def __init__(self, stream):
#     def supported(cls, stream=sys.stdout):
#     def write(self, text, color):
#     def __init__(self, stream):
#     def supported(cls, stream=sys.stdout):
#     def write(self, text, color):
# 
# Path: stestr/results.py
# def wasSuccessful(summary):
#     def __init__(self):
#     def startTestRun(self):
#     def status(self, *args, **kwargs):
#     def get_num_failures(self):
#     def get_time_taken(self):
#     def __init__(self, byte_stream):
#     def status(self, test_id=None, test_status=None, test_tags=None,
#                runnable=True, file_name=None, file_bytes=None, eof=False,
#                mime_type=None, route_code=None, timestamp=None):
#     def __init__(self, get_id, stream, previous_run=None):
#     def _format_error(self, label, test, error_text, test_tags=None):
#     def status(self, **kwargs):
#     def _get_previous_summary(self):
#     def _output_summary(self, run_id):
#     def startTestRun(self):
#     def stopTestRun(self):
#     def get_summary(self):
# class SummarizingResult(testtools.StreamSummary):
# class CatFiles(testtools.StreamResult):
# class CLITestResult(testtools.StreamResult):


# Path: stestr/subunit_trace.py
import argparse
import functools
import os
import re
import sys
import pbr.version
import subunit
import testtools
    import anydbm as dbm
    import dbm
from stestr import colorizer
from stestr import results


        if avg_runtime and avg_runtime > 0:
            run_time = float(run_time.rstrip('s'))
            perc_diff = ((run_time - avg_runtime) / avg_runtime) * 100
            return perc_diff
    return False


def show_outcome(stream, test, print_failures=False, failonly=False,
                 enable_diff=False, threshold='0', abbreviate=False,
                 enable_color=False, suppress_attachments=False,
                 all_attachments=False, show_binary_attachments=True):
    global RESULTS
    status = test['status']
    # TODO(sdague): ask lifeless why on this?
    if status == 'exists':
        return

    worker = find_worker(test)
    name = cleanup_test_name(test['id'])
    duration = get_duration(test['timestamps'])

    if worker not in RESULTS:
        RESULTS[worker] = []
    RESULTS[worker].append(test)

    # don't count the end of the return code as a fail
    if name == 'process-returncode':
        return


    for color in [colorizer.AnsiColorizer, colorizer.NullColorizer]: