test Exif self-equality

This commit is contained in:
luphord 2020-07-24 16:30:47 +02:00 committed by Andrew Murray
parent 9db5266fa7
commit 1fd9ccfe3c

View File

@ -242,6 +242,15 @@ class TestFileJpeg:
# Assert
assert exif[gps_index] == expected_exif_gps
def test_exif_equality(self):
# in 7.2.0 Exif rationals are read as TiffImagePlugin.IFDRational
# which broke self-equality of Exif data
exifs = []
for i in range(2):
with Image.open("Tests/images/exif-200dpcm.jpg") as im:
exifs.append(im._getexif())
assert exifs[0] == exifs[1]
def test_exif_rollback(self):
# rolling back exif support in 3.1 to pre-3.0 formatting.
# expected from 2.9, with b/u qualifiers switched for 3.2 compatibility