@@ -53,6 +53,7 @@ def test_closed_file() -> None:
53
53
54
54
def test_seek_after_close () -> None :
55
55
im = Image .open ("Tests/images/iss634.gif" )
56
+ assert isinstance (im , GifImagePlugin .GifImageFile )
56
57
im .load ()
57
58
im .close ()
58
59
@@ -377,7 +378,8 @@ def test_save_netpbm_bmp_mode(tmp_path: Path) -> None:
377
378
img = img .convert ("RGB" )
378
379
379
380
tempfile = str (tmp_path / "temp.gif" )
380
- GifImagePlugin ._save_netpbm (img , 0 , tempfile )
381
+ b = BytesIO ()
382
+ GifImagePlugin ._save_netpbm (img , b , tempfile )
381
383
with Image .open (tempfile ) as reloaded :
382
384
assert_image_similar (img , reloaded .convert ("RGB" ), 0 )
383
385
@@ -388,7 +390,8 @@ def test_save_netpbm_l_mode(tmp_path: Path) -> None:
388
390
img = img .convert ("L" )
389
391
390
392
tempfile = str (tmp_path / "temp.gif" )
391
- GifImagePlugin ._save_netpbm (img , 0 , tempfile )
393
+ b = BytesIO ()
394
+ GifImagePlugin ._save_netpbm (img , b , tempfile )
392
395
with Image .open (tempfile ) as reloaded :
393
396
assert_image_similar (img , reloaded .convert ("L" ), 0 )
394
397
@@ -648,7 +651,7 @@ def test_dispose2_palette(tmp_path: Path) -> None:
648
651
assert rgb_img .getpixel ((50 , 50 )) == circle
649
652
650
653
# Check that frame transparency wasn't added unnecessarily
651
- assert img . _frame_transparency is None
654
+ assert getattr ( img , " _frame_transparency" ) is None
652
655
653
656
654
657
def test_dispose2_diff (tmp_path : Path ) -> None :
0 commit comments