44
55import pytest
66
7- from PIL import Image
7+ from PIL import AniImagePlugin , Image
88
99from .helper import assert_image_equal_tofile
1010
1111
1212def test_aero_busy () -> None :
1313 with Image .open ("Tests/images/ani/aero_busy.ani" ) as im :
14+ assert isinstance (im , AniImagePlugin .AniImageFile )
1415 assert im .size == (64 , 64 )
1516 assert im .n_frames == 18
1617
@@ -29,6 +30,7 @@ def test_aero_busy() -> None:
2930
3031def test_posy_busy () -> None :
3132 with Image .open ("Tests/images/ani/posy_busy.ani" ) as im :
33+ assert isinstance (im , AniImagePlugin .AniImageFile )
3234 assert im .size == (96 , 96 )
3335 assert im .n_frames == 77
3436
@@ -43,6 +45,7 @@ def test_posy_busy() -> None:
4345
4446def test_seq_rate () -> None :
4547 with Image .open ("Tests/images/ani/stopwtch.ani" ) as im :
48+ assert isinstance (im , AniImagePlugin .AniImageFile )
4649 assert im .size == (32 , 32 )
4750 assert im .n_frames == 8
4851
@@ -122,6 +125,7 @@ def test_save() -> None:
122125 )
123126
124127 with Image .open (output , formats = ["ANI" ]) as im :
128+ assert isinstance (im , AniImagePlugin .AniImageFile )
125129 assert im .n_frames == 6
126130 assert im .info ["seq" ] == [0 , 2 , 4 , 1 , 3 , 5 , 0 , 1 , 0 , 1 ]
127131 assert im .info ["rate" ] == [1 , 2 , 3 , 1 , 2 , 3 , 1 , 2 , 3 , 4 ]
0 commit comments