cc: better formatting + give stats
This commit is contained in:
parent
f7da80c5e4
commit
0ca3c08447
8
test.py
8
test.py
|
@ -131,11 +131,9 @@ def main() -> int:
|
|||
stderr.write(indent(text="(fail)", prefix=INDENT * " ") + "\n")
|
||||
|
||||
else:
|
||||
stderr.write(indent(text="(pass)", prefix=INDENT * " ") + "\n")
|
||||
|
||||
if len(failures) == 0:
|
||||
return 0
|
||||
stderr.write(indent(text="(pass)", prefix=INDENT * " ") + "\n\n")
|
||||
|
||||
if len(failures) > 0:
|
||||
print(f"\n--- failures ---\n")
|
||||
|
||||
for fail in failures:
|
||||
|
@ -153,6 +151,8 @@ def main() -> int:
|
|||
+ (indent(text=fail.output, prefix=(2 * INDENT) * " "))
|
||||
)
|
||||
|
||||
print(f"\ncomplete: {len(tests) - len(failures)} passed, {len(failures)} failed")
|
||||
|
||||
return len(failures)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue