testsuite.py

changeset 98
f9d4e59392f7
parent 64
1c0884f5506e
child 99
01941a811b5a
--- a/testsuite.py	Tue Aug 25 21:58:09 2020 +0300
+++ b/testsuite.py	Tue Aug 25 22:08:30 2020 +0300
@@ -145,32 +145,6 @@
         messages.append(message)
     return '\n'.join(messages)
 
-def format_report(report, model, test_suite):
-    import colorama
-    colorama.init()
-    messages = []
-    for problem in report['problems']:
-        if problem.severity == 'hold':
-            text_colour = colorama.Fore.LIGHTRED_EX
-        elif problem.severity == 'warning':
-            text_colour = colorama.Fore.LIGHTBLUE_EX
-        else:
-            text_colour = ''
-        ldraw_code = model.body[problem.body_index].textual_representation()
-        message = str.format(
-            '{text_colour}{model_name}:{line_number}: {problem_type}: {message}'
-            '{colour_reset}\n\t{ldraw_code}',
-            text_colour = text_colour,
-            model_name = model.name,
-            line_number = problem.line_number,
-            problem_type = problem.severity,
-            message = problem_text(problem, test_suite),
-            colour_reset = colorama.Fore.RESET,
-            ldraw_code = ldraw_code,
-        )
-        messages.append(message)
-    return '\n'.join(messages)
-
 def iterate_problems(test_suite):
     for test_function in test_suite['tests']:
         yield from test_function.ldcheck_problem_types.values()

mercurial