[Test Suite] There should be a difference between expected and real errors

Bug #542863 reported by Stani on 2010-03-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Medium
Nadia Alramli

Bug Description

This should be treated as an error:

Traceback (most recent call last):
 File "/home/stani/sync/python/phatch/repo/trunk/phatch/core/api.py",
line 686, in apply_action_to_photo
   photo = action.apply(photo, read_only_settings, cache)
 File "/home/stani/sync/python/phatch/repo/trunk/phatch/actions/lossless_jpeg.py",
line 132, in apply
   % (_('Lossless JPEG action failed!'), stderr)
Exception: Lossless JPEG action failed! (jpegtran)
Invalid crop request

Stani (stani) on 2010-03-21
Changed in phatch:
assignee: Nadia Alramli (nadiana) → Stani (stani)
Stani (stani) wrote :

After reading you definition of a warning again, it fits that definition. However what is not useful that bugs like eg applying jpeg action to a gif, has the same error category as real errors. So can't we have another category 'expected' for errors which should happen. It would rather be a real error if the error didn't happen, so that could be tested too. Again I would like to have a command line option to exclude expected bugs.

ERROR 1: Can not apply action Lossless JPEG on image 'exĩf ïptç رعب.jpg' in folder:
/home/stani/sync/python/phatch/repo/trunk/tests/input
Lossless JPEG action failed with exit code "1"! (jpegtran)
Invalid crop request
Image: /home/stani/sync/python/phatch/repo/trunk/tests/input/exĩf ïptç رعب.jpg
Action:
{'fields': {'All': '30%',
            'Angle': u'270 degrees',
            'Bottom': '0px',
            'Direction': u'Horizontal',
            'File Name': u'<filename>-Lossless_JPEG-Progressive=False-Grayscale=False-RemoveMetadata=False-OptimizeFileSize=False-Mode=Auto-Transformation=Crop',
            'Grayscale': 'no',
            'In': u'/home/stani/sync/python/phatch/repo/trunk/tests/output/images',
            'Left': '0px',
            'Mode': u'Auto',
            'Optimize File Size': 'no',
            'Progressive': 'no',
            'Remove Metadata': 'no',
            'Right': '0px',
            'Top': '0px',
            'Transformation': u'Crop',
            '__enabled__': 'yes'},
 'label': 'Lossless JPEG'}
Details:
Traceback (most recent call last):
  File "/home/stani/sync/python/phatch/repo/trunk/phatch/core/api.py", line 686, in apply_action_to_photo
    photo = action.apply(photo, read_only_settings, cache)
  File "/home/stani/sync/python/phatch/repo/trunk/phatch/actions/lossless_jpeg.py", line 154, in apply
    stderr.decode(unicoding.ENCODING).split('\n')[0],
Exception: Lossless JPEG action failed with exit code "1"! (jpegtran)
Invalid crop request

Changed in phatch:
assignee: Stani (stani) → Nadia Alramli (nadiana)
summary: - [Test Suite] Invalid crop should be an error not a warning
+ [Test Suite] There should be a difference between expected and real
+ errors
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers