Fix bugs with the exifread library update
authorJessica Tallon <tsyesika@tsyesika.se>
Wed, 7 Oct 2015 11:48:42 +0000 (13:48 +0200)
committerJessica Tallon <tsyesika@tsyesika.se>
Wed, 7 Oct 2015 11:52:30 +0000 (13:52 +0200)
- As of version 2.1.2 of exifread the 90 CW and 90 CCW values were
  swapped, this bug is now fixed however our test data had those values
  swapped too. I have fixed that.

- I also noticed that I had different orientation values, this was
  noticed and fixed for some other differing values in commit ccca39f1
  when it was decided we'll add values which were noticed on different
  platforms.

mediagoblin/tests/test_exif.py

index e3869ec8ee6137a7e193f871b9b6c178b1663200..d0495a7aeded5d088ed4475abc07abf4747cf7ab 100644 (file)
@@ -306,7 +306,7 @@ def test_exif_extraction():
  'Image Orientation': {'field_length': 2,
                        'field_offset': 42,
                        'field_type': 3,
-                       'printable': u'Rotated 90 CCW',
+                       'printable': u'Rotated 90 CW',
                        'tag': 274,
                        'values': [6]},
  'Image ResolutionUnit': {'field_length': 2,
@@ -388,8 +388,10 @@ def test_exif_image_orientation():
     assert image.size in ((428, 640), (640, 428))
 
     # If this pixel looks right, the rest of the image probably will too.
+    # It seems different values are being seen on different platforms/systems
+    # as of ccca39f1 it seems we're adding to the list those which are seen.
     assert_in(image.getdata()[10000],
-              ((41, 28, 11), (43, 27, 11))
+              ((37, 23, 14), (41, 28, 11), (43, 27, 11))
               )