File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1103,13 +1103,15 @@ def test_exif_transpose(self) -> None:
1103
1103
)
1104
1104
def test_buffering (self , test_file : str ) -> None :
1105
1105
# load exif first
1106
- with Image .open (open (test_file , "rb" , buffering = 1048576 )) as im :
1107
- exif = dict (im .getexif ())
1106
+ with open (test_file , "rb" , buffering = 1048576 ) as f :
1107
+ with Image .open (f ) as im :
1108
+ exif = dict (im .getexif ())
1108
1109
1109
1110
# load image before exif
1110
- with Image .open (open (test_file , "rb" , buffering = 1048576 )) as im2 :
1111
- im2 .load ()
1112
- exif_after_load = dict (im2 .getexif ())
1111
+ with open (test_file , "rb" , buffering = 1048576 ) as f :
1112
+ with Image .open (f ) as im2 :
1113
+ im2 .load ()
1114
+ exif_after_load = dict (im2 .getexif ())
1113
1115
1114
1116
assert exif == exif_after_load
1115
1117
You can’t perform that action at this time.
0 commit comments