We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e19a149 commit a9d05a1Copy full SHA for a9d05a1
Tests/test_file_libtiff.py
@@ -1103,13 +1103,15 @@ def test_exif_transpose(self) -> None:
1103
)
1104
def test_buffering(self, test_file: str) -> None:
1105
# load exif first
1106
- with Image.open(open(test_file, "rb", buffering=1048576)) as im:
1107
- exif = dict(im.getexif())
+ with open(test_file, "rb", buffering=1048576) as f:
+ with Image.open(f) as im:
1108
+ exif = dict(im.getexif())
1109
1110
# load image before exif
- with Image.open(open(test_file, "rb", buffering=1048576)) as im2:
1111
- im2.load()
1112
- exif_after_load = dict(im2.getexif())
+ with Image.open(f) as im2:
1113
+ im2.load()
1114
+ exif_after_load = dict(im2.getexif())
1115
1116
assert exif == exif_after_load
1117
0 commit comments