Modify printTest(): Ignore the difference of data_dir

main
LeoHsiao 5 years ago
parent 23b759bffa
commit 788f78987c

@ -456,8 +456,9 @@ def printTest(filename):
src_file = os.path.join(Config.data_dir, filename) src_file = os.path.join(Config.data_dir, filename)
good_file = os.path.join(Config.data_dir, filename + '.ipgd') good_file = os.path.join(Config.data_dir, filename + '.ipgd')
copyTestFile(filename, test_file) copyTestFile(filename, test_file)
save(execute('iptcprint {src_file}', vars(), expected_returncodes=None, return_in_bytes=True) + b'\n', output = execute('iptcprint {src_file}', vars(), expected_returncodes=None, return_in_bytes=True)
test_file) output = output.replace(os.path.normpath(Config.data_dir).encode(), b'../data') # Ignore the difference of data_dir
save(output + b'\n', test_file)
return diffCheck(good_file, test_file, in_bytes=True) return diffCheck(good_file, test_file, in_bytes=True)

Loading…
Cancel
Save