diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 376f4e8f2..43b0d9016 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -1125,8 +1125,6 @@ class TestFileLibTiff(LibTiffTestCase): for i in range(2, 9): with Image.open("Tests/images/g4_orientation_" + str(i) + ".tif") as im: transposed_im = ImageOps.exif_transpose(im) - assert transposed_im is not None - assert_image_similar(base_im, transposed_im, 0.7) @pytest.mark.parametrize( diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py index df07811cf..0a3975c54 100644 --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -440,11 +440,10 @@ def test_exif_transpose() -> None: # Orientation from "Raw profile type exif" info key # This test image has been manually hexedited from exif_imagemagick.png # to have a different orientation - with Image.open("Tests/images/exif_imagemagick_orientation.png") as img: - assert img.getexif()[0x0112] == 3 + with Image.open("Tests/images/exif_imagemagick_orientation.png") as im: + assert im.getexif()[0x0112] == 3 - transposed_im = ImageOps.exif_transpose(img) - assert transposed_im is not None + transposed_im = ImageOps.exif_transpose(im) assert 0x0112 not in transposed_im.getexif() # Orientation set directly on Image.Exif