mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 13:40:54 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
c7a9582eab
commit
44cc0bebb8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user