mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Changed file opening to use with
This commit is contained in:
parent
241f437b60
commit
4b1784c9ad
|
@ -26,8 +26,8 @@ class TestFileCur(PillowTestCase):
|
|||
no_cursors_file = "Tests/images/no_cursors.cur"
|
||||
|
||||
cur = CurImagePlugin.CurImageFile(TEST_FILE)
|
||||
cur.fp = open(no_cursors_file, "rb")
|
||||
self.assertRaises(TypeError, cur._open)
|
||||
with open(no_cursors_file, "rb") as cur.fp:
|
||||
self.assertRaises(TypeError, cur._open)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue
Block a user