From c6b8905406f3e705e94549725b04b86ec227a971 Mon Sep 17 00:00:00 2001 From: Marshall Hallenbeck Date: Mon, 13 Nov 2023 12:17:04 -0500 Subject: [PATCH] tests: improve output of e2e tests for errors by not coloring the entire output red and printing command before running --- tests/e2e_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e_test.py b/tests/e2e_test.py index 81c44c7a..e2fdadda 100644 --- a/tests/e2e_test.py +++ b/tests/e2e_test.py @@ -108,6 +108,7 @@ def run_e2e_tests(args): while tasks: task = tasks.pop(0) + console.log(f"Running command: {task!s}") result = subprocess.Popen( str(task), shell=True, @@ -129,7 +130,8 @@ def run_e2e_tests(args): if args.errors: raw_text = text.decode("utf-8") if "error" in raw_text.lower() or "failure" in raw_text.lower(): - console.log(f"[bold red] Error Detected: {raw_text}") + console.log("[bold red]Error Detected:") + console.log(f"{raw_text}") if args.verbose: # this prints sorta janky, but it does its job