From 65266a74193edc59fcae91d513efd771bc8413a8 Mon Sep 17 00:00:00 2001 From: David Schmidt Date: Thu, 23 May 2013 20:02:19 +0300 Subject: [PATCH] Update test_file_gif.py remove warning --- Tests/test_file_gif.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 3d3d43a7e..0c27865cd 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -9,7 +9,8 @@ if "gif_encoder" not in codecs or "gif_decoder" not in codecs: # sample gif stream file = "Images/lena.gif" -data = open(file, "rb").read() +with open(file, "rb") as f: + data = f.read() def test_sanity(): im = Image.open(file)