Changed file opening to use with

This commit is contained in:
Andrew Murray 2017-05-29 19:24:00 +10:00
parent 241f437b60
commit 4b1784c9ad

View File

@ -26,7 +26,7 @@ class TestFileCur(PillowTestCase):
no_cursors_file = "Tests/images/no_cursors.cur"
cur = CurImagePlugin.CurImageFile(TEST_FILE)
cur.fp = open(no_cursors_file, "rb")
with open(no_cursors_file, "rb") as cur.fp:
self.assertRaises(TypeError, cur._open)