mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Parametrized test
This commit is contained in:
parent
ea0abb94cc
commit
26ca569cbe
|
@ -274,17 +274,15 @@ def test_sgnd(tmp_path):
|
||||||
assert reloaded_signed.getpixel((0, 0)) == 128
|
assert reloaded_signed.getpixel((0, 0)) == 128
|
||||||
|
|
||||||
|
|
||||||
def test_rgba():
|
@pytest.mark.parametrize("ext", (".j2k", ".jp2"))
|
||||||
|
def test_rgba(ext):
|
||||||
# Arrange
|
# Arrange
|
||||||
with Image.open("Tests/images/rgb_trns_ycbc.j2k") as j2k:
|
with Image.open("Tests/images/rgb_trns_ycbc" + ext) as im:
|
||||||
with Image.open("Tests/images/rgb_trns_ycbc.jp2") as jp2:
|
# Act
|
||||||
# Act
|
im.load()
|
||||||
j2k.load()
|
|
||||||
jp2.load()
|
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
assert j2k.mode == "RGBA"
|
assert im.mode == "RGBA"
|
||||||
assert jp2.mode == "RGBA"
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("ext", (".j2k", ".jp2"))
|
@pytest.mark.parametrize("ext", (".j2k", ".jp2"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user