From c279996aa2149df709627a4b4f5d8d31663efb51 Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Wed, 26 Aug 2020 18:07:44 +0200 Subject: [PATCH] Colorize failed test output --- driver.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/driver.py b/driver.py index d8710ba..1af6201 100755 --- a/driver.py +++ b/driver.py @@ -181,8 +181,8 @@ def run_py_test(testname): print(colorize('ERROR', COLOR_RED)) print(colorize('=====================================', COLOR_RED)) - print("Expected %s" % exp_result) - print("Got %s" % result) + print("Expected %s" % exp_result.pretty_string(tty=True)) + print("Got %s" % result.pretty_string(tty=True)) print(colorize('=====================================', COLOR_RED)) return False @@ -265,11 +265,11 @@ def run_test(testname): print("Optimized query: %s -> %s" % (o_query, o_expr)) print(colorize('=====================================', COLOR_RED)) print(colorize("Expected result", COLOR_GREEN)) - print(result_rel) + print(result_rel.pretty_string(tty=True)) print(colorize("Result", COLOR_RED)) - print(result) + print(result.pretty_string(tty=True)) print(colorize("Optimized result", COLOR_RED)) - print(o_result) + print(o_result.pretty_string(tty=True)) print(colorize("optimized result match %s" % str(result_rel == o_result), COLOR_MAGENTA)) print(colorize("result match %s" %