mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50: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
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('test_file', [
|
@pytest.mark.parametrize(
|
||||||
'Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif',
|
"test_file",
|
||||||
'Tests/images/old-style-jpeg-compression.tif',
|
[
|
||||||
])
|
"Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif",
|
||||||
|
"Tests/images/old-style-jpeg-compression.tif",
|
||||||
|
],
|
||||||
|
)
|
||||||
def test_libtiff_exif_loading(test_file) -> None:
|
def test_libtiff_exif_loading(test_file) -> None:
|
||||||
# loading image before exif
|
# loading image before exif
|
||||||
im1 = Image.open(open(test_file, 'rb', buffering=1048576))
|
im1 = Image.open(open(test_file, "rb", buffering=1048576))
|
||||||
im1.load()
|
im1.load()
|
||||||
exif1 = dict(im1.getexif())
|
exif1 = dict(im1.getexif())
|
||||||
|
|
||||||
# loading exif before image
|
# 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())
|
exif2 = dict(im2.getexif())
|
||||||
|
|
||||||
assert exif1 == exif2
|
assert exif1 == exif2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user