Skip to content

Commit

Permalink
output the result as base64 for travis debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Apr 1, 2016
1 parent a82453c commit 4c1ed82
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/z3c/rml/tests/test_rml.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ def assertSameImage(self, baseImage, testImage):
base = Image.open(base_file).getdata()
test = Image.open(test_file).getdata()
for i in range(len(base)):
if (base[i] - test[i]) != 0:
if not (base[i] - test[i]) != 0:
if 'TRAVIS' in os.environ:
# output the result as base64 for travis debugging
base_file.seek(0)
print()
print(testImage)
print(test_file.read().encode('base64'))
self.fail(
'Image is not the same: %s' % os.path.basename(baseImage)
)
Expand Down

0 comments on commit 4c1ed82

Please sign in to comment.