mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 21:24:31 +03:00
Parametrized test
This commit is contained in:
parent
ca5a81ef27
commit
d4b627b664
|
@ -592,14 +592,17 @@ class TestFilePng:
|
||||||
with Image.open("Tests/images/hopper_idat_after_image_end.png") as im:
|
with Image.open("Tests/images/hopper_idat_after_image_end.png") as im:
|
||||||
assert im.text == {"TXT": "VALUE", "ZIP": "VALUE"}
|
assert im.text == {"TXT": "VALUE", "ZIP": "VALUE"}
|
||||||
|
|
||||||
def test_exif(self):
|
@pytest.mark.parametrize(
|
||||||
for test_file in (
|
"test_file",
|
||||||
|
[
|
||||||
"Tests/images/exif.png", # With an EXIF chunk
|
"Tests/images/exif.png", # With an EXIF chunk
|
||||||
"Tests/images/exif_imagemagick.png", # With an ImageMagick zTXt chunk
|
"Tests/images/exif_imagemagick.png", # With an ImageMagick zTXt chunk
|
||||||
):
|
],
|
||||||
with Image.open(test_file) as im:
|
)
|
||||||
exif = im._getexif()
|
def test_exif(self, test_file):
|
||||||
assert exif[274] == 1
|
with Image.open(test_file) as im:
|
||||||
|
exif = im._getexif()
|
||||||
|
assert exif[274] == 1
|
||||||
|
|
||||||
def test_exif_save(self, tmp_path):
|
def test_exif_save(self, tmp_path):
|
||||||
with Image.open("Tests/images/exif.png") as im:
|
with Image.open("Tests/images/exif.png") as im:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user