def section(self, label, name, nl=True): if name: line = "\n{label}: {name}".format(label=label.upper(),name=name) line += '\n' if nl else '' color_print(line,fore=WHITE.bold()) elif nl: print
def log_test(self, label, results): line = "{label}: {name}".format(label=label,name=results.name) color_print(line,fore=WHITE.bold()) if results: Printer._print_status(results) Printer._print_results(results) else: Printer._print_no_asserts() print
def _print_result(result): if result.result is None: color_print(result,fore=BLUE.bold()) elif result.result: color_print(result,fore=GREEN.bold()) else: color_print(result,fore=RED.bold())
def _print_status(results): status = results.get_status() if status is None: color_print("ERROR",back=BLUE.bold()) elif status: color_print("PASSED",back=GREEN.bold()) else: color_print("FAILED",back=RED.bold())
def _print_no_asserts(): color_print("NO ASSERTS",fore=BLACK.bold(),back=WHITE)
def title(self, title): color_print("\n\n{0}".format(title.upper()),fore=WHITE.bold())