Skip to content

Commit

Permalink
using datatable for results
Browse files Browse the repository at this point in the history
  • Loading branch information
acutesoftware committed May 17, 2017
1 parent ea22a16 commit 21ae1b5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/examples/table_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@


def main():
analysis = []
analysis = cl.DataTable('Results' , ',', col_names = ['results'])
if len(sys.argv) != 3:
print('usage:')
print('table_compare.py "TABLE1.CSV" "TABLE2.CSV":')
Expand All @@ -61,18 +61,22 @@ def main():

res, pass_fail = check_col_names(t_old, t_new)
#print(res)
analysis.append(res)
analysis.add([res])
if pass_fail != 'OK':
print('Bypassing exact row test, as columns are different')
else:
print(check_rows(t_old, t_new))

res, pass_fail = compare_values(t_old, t_new)
analysis.append(res)

analysis.add([res])
print(analysis.arr)

print('Comparing distinct values....')
analysis.append(distinct_values(t_old, t_new))
res = distinct_values(t_old, t_new)
for r in res:
analysis.add(r)

analysis.save_csv('results.csv', write_header_separately=True)

import pprint
pprint.pprint(analysis)
Expand Down

0 comments on commit 21ae1b5

Please sign in to comment.