File tree 1 file changed +9
-7
lines changed
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):
853
853
)
854
854
855
855
856
- def test_write_no_comment (tmp_path ):
856
+ def test_empty_string_comment (tmp_path ):
857
857
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
860
862
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
865
867
866
868
867
869
def test_version (tmp_path ):
You can’t perform that action at this time.
0 commit comments