File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -853,15 +853,17 @@ def test_write_comment(tmp_path):
853853 )
854854
855855
856- def test_write_no_comment (tmp_path ):
856+ def test_empty_string_comment (tmp_path ):
857857 out = str (tmp_path / "temp.gif" )
858- with Image .open ("Tests/images/dispose_prev.gif" ) as im :
859- # Empty comment="" arg should suppress all comments
858+ with Image .open ("Tests/images/chi.gif" ) as im :
859+ assert "comment" in im .info
860+
861+ # Empty string comment should suppress existing comment
860862 im .save (out , save_all = True , comment = "" )
861- with Image . open ( out ) as reread :
862- assert "comment" not in reread . info
863- for frame in ImageSequence .Iterator (reread ):
864- assert "comment" not in frame .info
863+
864+ with Image . open ( out ) as reread :
865+ for frame in ImageSequence .Iterator (reread ):
866+ assert "comment" not in frame .info
865867
866868
867869def test_version (tmp_path ):
You can’t perform that action at this time.
0 commit comments