Skip to content

Commit

Permalink
output the PDF too
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Apr 4, 2016
1 parent 0f6b8c4 commit 73490af
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/z3c/rml/tests/test_rml.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,17 @@ def assertSameImage(self, baseImage, testImage):
test = Image.open(test_file).getdata()
for i in range(len(base)):
if (base[i] - test[i]) != 0:
# output the result as base64 for travis debugging
test_file.seek(0)
print()
print(os.environ)
print(testImage)
print(test_file.read().encode('base64'))
if True:
# output the result as base64 for travis debugging
# flip the above condition to activate this code
test_file.seek(0)
print()
print(os.system("gs --version"))
print(testImage)
print(test_file.read().encode('base64'))
print(self._testPath)
with open(self._testPath, 'rb') as test_pdf:
print(test_pdf.read().encode('base64'))
self.fail(
'Image is not the same: %s' % os.path.basename(baseImage)
)
Expand Down

0 comments on commit 73490af

Please sign in to comment.