File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -778,11 +778,15 @@ class MyStdOut:
778
778
with Image .open (mystdout ) as reloaded :
779
779
assert_image_equal_tofile (reloaded , TEST_PNG_FILE )
780
780
781
- def test_end_truncated_file (self ):
781
+ def test_truncated_end_chunk (self ):
782
+ with Image .open ("Tests/images/truncated_end_chunk.png" ) as im :
783
+ with pytest .raises (OSError ):
784
+ im .load ()
785
+
782
786
ImageFile .LOAD_TRUNCATED_IMAGES = True
783
787
try :
784
- with Image .open ("Tests/images/end_trunc_file .png" ) as im :
785
- assert_image_equal_tofile (im , "Tests/images/end_trunc_file .png" )
788
+ with Image .open ("Tests/images/truncated_end_chunk .png" ) as im :
789
+ assert_image_equal_tofile (im , "Tests/images/hopper .png" )
786
790
finally :
787
791
ImageFile .LOAD_TRUNCATED_IMAGES = False
788
792
You can’t perform that action at this time.
0 commit comments