File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import pytest
44
5- from PIL import Image
5+ from PIL import GifImagePlugin , Image , JpegXlImagePlugin
66
77from .helper import assert_image_equal , skip_unless_feature
88
@@ -13,10 +13,12 @@ def test_n_frames() -> None:
1313 """Ensure that jxl format sets n_frames and is_animated attributes correctly."""
1414
1515 with Image .open ("Tests/images/jxl/hopper.jxl" ) as im :
16+ assert isinstance (im , JpegXlImagePlugin .JpegXlImageFile )
1617 assert im .n_frames == 1
1718 assert not im .is_animated
1819
1920 with Image .open ("Tests/images/jxl/iss634.jxl" ) as im :
21+ assert isinstance (im , JpegXlImagePlugin .JpegXlImageFile )
2022 assert im .n_frames == 41
2123 assert im .is_animated
2224
@@ -39,6 +41,8 @@ def test_seek() -> None:
3941
4042 with Image .open ("Tests/images/jxl/traffic_light.jxl" ) as im1 :
4143 with Image .open ("Tests/images/jxl/traffic_light.gif" ) as im2 :
44+ assert isinstance (im1 , JpegXlImagePlugin .JpegXlImageFile )
45+ assert isinstance (im2 , GifImagePlugin .GifImageFile )
4246 assert im1 .n_frames == im2 .n_frames
4347 assert im1 .is_animated
4448
You can’t perform that action at this time.
0 commit comments