Commit 974c55e9 authored by Rafael Monnerat's avatar Rafael Monnerat

Improve verbosity of the tests to help understand what it is wrong.

parent f29bb1da
......@@ -2054,10 +2054,22 @@ return 1
image_document_image_size_no_quality,image_document_file_size_no_quality = self.getURLSizeList(url, **convert_kw)
# check file sizes
self.assertTrue(image_document_file_size_100p > image_document_file_size_no_quality and \
image_document_file_size_no_quality > image_document_file_size_5p)
image_document_file_size_no_quality > image_document_file_size_5p,
"%s should be more then %s and %s should be more them %s" % \
(image_document_file_size_100p,
image_document_file_size_no_quality,
image_document_file_size_no_quality,
image_document_file_size_5p)
)
# no matter of quality image sizes whould be the same
self.assertTrue(image_document_image_size_100p==image_document_image_size_5p and \
image_document_image_size_5p==image_document_image_size_no_quality)
image_document_image_size_5p==image_document_image_size_no_quality,
"%s should be equals to %s and %s should be equals to %s" % \
(image_document_image_size_100p,
image_document_image_size_5p,
image_document_image_size_5p,
image_document_image_size_no_quality)
)
def test_checkConversionFormatPermission(self):
"""
......@@ -2541,7 +2553,9 @@ class TestDocumentPerformance(TestDocumentMixin):
after = time.time()
req_time = (after - before)
# we should have image converted in less than 20s
self.assertTrue(req_time < 30.0)
self.assertTrue(req_time < 30.0,
"Conversion took %s seconds and it is not less them 30.0 seconds" % \
req_time)
def test_suite():
suite = unittest.TestSuite()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment