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