Fix typo
Tests / Run-Tests (push) Successful in 6s Details
Benchmarks / Run-Benchmarks (push) Successful in 4m22s Details

multiline-output
drunkendog 2023-09-25 18:46:21 +01:00
parent ff7225cb2b
commit a21d23b75b
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import glob
import subprocess import subprocess
import os import os
import sys import sys
import differ import difflib
import pprint import pprint
# will break if there are namespace collisions # will break if there are namespace collisions
@ -36,7 +36,7 @@ for file_name in glob.glob("*.c", recursive=False):
passed_tests += test_passed_int passed_tests += test_passed_int
print(f"\u001b[{31 + test_passed_int}m({x_split[0]})\u001b[0m") print(f"\u001b[{31 + test_passed_int}m({x_split[0]})\u001b[0m")
if not passed_tests: if not passed_tests:
pprint.pprint(list(differ.Differ().compare(x_split[1].splitlines(), return_data.splitlines()))) pprint.pprint(list(difflib.Differ().compare(x_split[1].splitlines(), return_data.splitlines())))
print(f"\u001b[32m{passed_tests} tests passed\u001b[0m, \u001b[{31 - 31*int(total_tests == passed_tests)}m{total_tests - passed_tests} tests failed\u001b[0m") print(f"\u001b[32m{passed_tests} tests passed\u001b[0m, \u001b[{31 - 31*int(total_tests == passed_tests)}m{total_tests - passed_tests} tests failed\u001b[0m")
exit_code += total_tests - passed_tests exit_code += total_tests - passed_tests
os.remove("a.out") os.remove("a.out")