Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 20, 2024
1 parent c7a9582 commit 44cc0be
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Tests/test_libtiff_file_position.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
from __future__ import annotations


import pytest

from PIL import Image


@pytest.mark.parametrize('test_file', [
'Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif',
'Tests/images/old-style-jpeg-compression.tif',
])
@pytest.mark.parametrize(
"test_file",
[
"Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif",
"Tests/images/old-style-jpeg-compression.tif",
],
)
def test_libtiff_exif_loading(test_file) -> None:
# loading image before exif
im1 = Image.open(open(test_file, 'rb', buffering=1048576))
im1 = Image.open(open(test_file, "rb", buffering=1048576))
im1.load()
exif1 = dict(im1.getexif())

# loading exif before image
im2 = Image.open(open(test_file, 'rb', buffering=1048576))
im2 = Image.open(open(test_file, "rb", buffering=1048576))
exif2 = dict(im2.getexif())

assert exif1 == exif2

0 comments on commit 44cc0be

Please sign in to comment.