We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 06e66f7 + 26ca569 commit 3c5324bCopy full SHA for 3c5324b
Tests/test_file_jpeg2k.py
@@ -274,17 +274,15 @@ def test_sgnd(tmp_path):
274
assert reloaded_signed.getpixel((0, 0)) == 128
275
276
277
-def test_rgba():
+@pytest.mark.parametrize("ext", (".j2k", ".jp2"))
278
+def test_rgba(ext):
279
# Arrange
- with Image.open("Tests/images/rgb_trns_ycbc.j2k") as j2k:
280
- with Image.open("Tests/images/rgb_trns_ycbc.jp2") as jp2:
281
- # Act
282
- j2k.load()
283
- jp2.load()
284
-
285
- # Assert
286
- assert j2k.mode == "RGBA"
287
- assert jp2.mode == "RGBA"
+ with Image.open("Tests/images/rgb_trns_ycbc" + ext) as im:
+ # Act
+ im.load()
+
+ # Assert
+ assert im.mode == "RGBA"
288
289
290
@pytest.mark.parametrize("ext", (".j2k", ".jp2"))
0 commit comments