Commit 47791e72 authored by Duc Cao's avatar Duc Cao

Helper script to compare files in 2 folders

parent 2eec3507
import os
is_correct_output = True
output_folder = 'out/'
expected_output_folder = 'expected_output/'
for file_name in os.listdir(output_folder):
with open(os.path.join(output_folder, file_name)) as f:
out =
with open(os.path.join(expected_output_folder, file_name)) as f:
expected =
if out != expected:
print('DIFF', file_name)
is_correct_output = False
if len(os.listdir(output_folder)) != len(os.listdir(expected_output_folder)):
print('Different number of output files')
is_correct_output = False
if is_correct_output:
print('Correct output')
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment