How to use the green.result.proto_test function in green

To help you get started, we’ve selected a few green examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CleanCut / green / green / loader.py View on Github external
"""
    if test_list is None:
        test_list = []
    # Python's lousy handling of module import failures during loader
    # discovery makes this crazy special case necessary.  See
    # _make_failed_import_test in the source code for unittest.loader
    if suite.__class__.__name__ == 'ModuleImportFailure':
        if doing_completions:
            return test_list
        exception_method = str(suite).split()[0]
        getattr(suite, exception_method)()
    # On to the real stuff
    if issubclass(type(suite), unittest.TestCase):
        # Skip actual blank TestCase objects that twisted inserts
        if str(type(suite)) != "":
            test_list.append(proto_test(suite))
    else:
        for i in suite:
            toProtoTestList(i, test_list, doing_completions)
    return test_list
github CleanCut / green / green / process.py View on Github external
def start_callback(test):
        # Let the main process know what test we are starting
        test = proto_test(test)
        if test not in already_sent:
            queue.put(test)
            already_sent.add(test)