aboutsummaryrefslogtreecommitdiff
path: root/prettier.py
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-01 10:11:13 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-04 21:05:22 +0200
commit99a4f8397a9652b15d171ecb86e7281b80ed57d7 (patch)
treedd303233795aa1cdddae44555bad941fada70762 /prettier.py
parent4388cc2d74f1ee8930ca1baaeeea67da925f8a2c (diff)
downloadlibasm_test-errno.tar.gz
libasm_test-errno.tar.bz2
libasm_test-errno.zip
Adding errno checking according to new subject (#2)errno
prettier compatible with python < 3.6 removed unaccurate test for ft_read
Diffstat (limited to 'prettier.py')
-rw-r--r--prettier.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/prettier.py b/prettier.py
index f73e0e4..1833a71 100644
--- a/prettier.py
+++ b/prettier.py
@@ -6,7 +6,7 @@
# By: cacharle <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/02/05 23:04:13 by cacharle #+# #+# #
-# Updated: 2020/02/05 23:07:13 by cacharle ### ########.fr #
+# Updated: 2020/05/04 14:44:44 by charles ### ########.fr #
# #
# **************************************************************************** #
@@ -17,11 +17,11 @@ import argparse
def green(*strings):
- return "".join([f"\033[32m{s}\033[0m" for s in strings])
+ return "".join(["\033[32m{}\033[0m".format(s) for s in strings])
def red(*strings):
- return "".join([f"\033[31m{s}\033[0m" for s in strings])
+ return "".join(["\033[31m{}\033[0m".format(s) for s in strings])
def create_logs_entry(logs, key):
logs[key] = {}
@@ -89,9 +89,10 @@ if __name__ == "__main__":
for k, v in logs.items():
for e in v["ko_info"]:
if e['type'] == "SEGFAULT":
- print(f"{k} : {red('SEGFAULT')}")
+ print("{} : {}".format(k, red('SEGFAULT')))
elif e['type'] == "COMPARE":
- p = f"{k}"
+ p = str(k)
if e["with"] is not None:
- p += f"with {e['with']}"
- print(p, f":\n {green('expected: ') + e['expected']}\n {red('actual: ') + e['actual']}")
+ p += "with {}".format(e['with'])
+ print(p, ":\n {}\n {}".format(green('expected: ') + e['expected'],
+ red('actual: ') + e['actual']))