Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
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
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)