File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -775,7 +775,9 @@ def test_pillow_version(self, test_module):
775775 with pytest .warns (DeprecationWarning ):
776776 assert test_module .PILLOW_VERSION > "7.0.0"
777777
778- @pytest .mark .parametrize ("path" , [
778+ @pytest .mark .parametrize (
779+ "path" ,
780+ [
779781 "fli_overrun.bin" ,
780782 "sgi_overrun.bin" ,
781783 "sgi_overrun_expandrow.bin" ,
@@ -784,7 +786,8 @@ def test_pillow_version(self, test_module):
784786 "pcx_overrun2.bin" ,
785787 "ossfuzz-4836216264589312.pcx" ,
786788 "01r_00.pcx" ,
787- ])
789+ ],
790+ )
788791 def test_overrun (self , path ):
789792 """For overrun completeness, test as:
790793 valgrind pytest -qq Tests/test_image.py::TestImage::test_overrun | grep decode.c
@@ -794,8 +797,10 @@ def test_overrun(self, path):
794797 im .load ()
795798 assert False
796799 except OSError as e :
797- assert (str (e ) == "buffer overrun when reading image file" or
798- "image file is truncated" in str (e ))
800+ buffer_overrun = str (e ) == "buffer overrun when reading image file"
801+ truncated = "image file is truncated" in str (e )
802+
803+ assert buffer_overrun or truncated
799804
800805 def test_fli_overrun2 (self ):
801806 with Image .open ("Tests/images/fli_overrun2.bin" ) as im :
You can’t perform that action at this time.
0 commit comments