Replace pprint with print
parent
c6f1b2446a
commit
cb4bdaec17
|
@ -5,7 +5,6 @@ import subprocess
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import difflib
|
import difflib
|
||||||
import pprint
|
|
||||||
|
|
||||||
# will break if there are namespace collisions
|
# will break if there are namespace collisions
|
||||||
|
|
||||||
|
@ -35,8 +34,10 @@ for file_name in glob.glob("*.c", recursive=False):
|
||||||
total_tests += 1
|
total_tests += 1
|
||||||
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 True: # not passed_tests:
|
if not passed_tests:
|
||||||
pprint.pprint(list(difflib.Differ().compare(x_split[1].splitlines(), return_data.splitlines())))
|
[print(x) for x in difflib.Differ().compare(x_split[1].splitlines(), return_data.splitlines())]
|
||||||
|
else:
|
||||||
|
[print(x) for x in 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")
|
||||||
|
|
Loading…
Reference in New Issue