1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-21 20:50:07 +00:00

percent output was wrong by factor of 100

This commit is contained in:
Joachim Wuttke (o) 2016-09-26 18:22:53 +02:00
parent 6c49775563
commit e73aaa169f

View File

@ -68,10 +68,10 @@ class BrowserTests(Common):
# save the diff image (http://stackoverflow.com/questions/15721484):
diff_file_name = os.path.join(self.PNGDIR, basefilename + '.diff.png')
diff_img.convert('RGB').save(diff_file_name)
self.fail(('PNG files %s and %s differ by <= %d pixels, (%f%% of %d pixels in total), '+
'difference: %s') %
self.fail(('PNG files %s and %s differ by at most %d pixels, '+
'(%f%% of %d pixels in total), difference: %s') %
(pngfilename_out, pngfilename_ref,
diff_size, 1.0*diff_size/img_size, img_size, diff_file_name))
diff_size, 100.0*diff_size/img_size, img_size, diff_file_name))
@unittest.skipIf(Common.GENERATING_MODE, 'Do not auto generate reference for test_fail')
def test_fail(self):