From 7a5acfcd36d4c0484fd1a5ef54b7c2dc4e9d0f99 Mon Sep 17 00:00:00 2001 From: Cr0a3 <127748753+Cr0a3@users.noreply.github.com> Date: Sat, 14 Sep 2024 12:02:58 +0000 Subject: [PATCH] [TEST.py] integrationg failed and sucess display --- tools/test.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/test.py b/tools/test.py index e5b9214c..0914753d 100644 --- a/tools/test.py +++ b/tools/test.py @@ -1,3 +1,4 @@ +from base64 import decode import glob from colorama import init, Fore, Style import subprocess @@ -11,13 +12,15 @@ passed = 0 for test in tests: - process = subprocess.run(["cargo", "run", "-p", "ytest", "--", f"-t={test}"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + process = subprocess.run(["cargo", "run", "-p", "ytest", "--", f"-t={test}"], capture_output=True) if process.returncode == 0: - print(Fore.GREEN + test + Style.RESET_ALL) + print(Fore.GREEN + "SUCESS " + test + Style.RESET_ALL) passed += 1 else: failed += 1 - print(Fore.RED + test + Style.RESET_ALL) + print(Fore.RED + "==== FAILED " + test + " ====" + Style.RESET_ALL) + print(process.stdout.decode()) + print(process.stdout.decode()) print( Fore.GREEN + str(passed) + Style.RESET_ALL +