-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrettyPrint.py
31 lines (22 loc) · 902 Bytes
/
PrettyPrint.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import GraphUtil
def pretty_print_list(name_of_test, list_of_matrix):
matrix = GraphUtil.list_to_matrix(list_of_matrix)
pretty_print(name_of_test, matrix)
def pretty_print(name_of_test, matrix):
print(name_of_test)
for row in matrix:
line = ""
for c in row:
line += str(c)
line += ",\t\t"
print(line)
def debug_pretty_print(expected, actual):
if len(expected) != len(actual):
print("Number of rows are not the same of expected [" + len(expected) + "] and actual [" + len(actual) + "]")
if len(expected[0]) != len(actual[0]):
print("Number of columns are not the same of expected [" + len(expected[0]) + "] and actual [" + len(actual[0]) + "]")
for r in range(0, len(expected)):
line = ""
for c in range(0, len(expected[r])):
e = expected[r][c]
a = actual[r][c]