Skip to content

Commit 769a14d

Browse files
authored
Merge pull request #8765 from radarhere/mpo
2 parents 1496d87 + dc94d1d commit 769a14d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/test_file_mpo.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ def roundtrip(im: Image.Image, **options: Any) -> ImageFile.ImageFile:
2929

3030
@pytest.mark.parametrize("test_file", test_files)
3131
def test_sanity(test_file: str) -> None:
32-
with Image.open(test_file) as im:
32+
def check(im: ImageFile.ImageFile) -> None:
3333
im.load()
3434
assert im.mode == "RGB"
3535
assert im.size == (640, 480)
3636
assert im.format == "MPO"
3737

38+
with Image.open(test_file) as im:
39+
check(im)
40+
with MpoImagePlugin.MpoImageFile(test_file) as im:
41+
check(im)
42+
3843

3944
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
4045
def test_unclosed_file() -> None:

0 commit comments

Comments
 (0)