mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Close fp before replacing
This commit is contained in:
parent
b637b5f7a2
commit
c0ee319af1
|
@ -26,6 +26,7 @@ class TestFileCur(PillowTestCase):
|
||||||
no_cursors_file = "Tests/images/no_cursors.cur"
|
no_cursors_file = "Tests/images/no_cursors.cur"
|
||||||
|
|
||||||
cur = CurImagePlugin.CurImageFile(TEST_FILE)
|
cur = CurImagePlugin.CurImageFile(TEST_FILE)
|
||||||
|
cur.fp.close()
|
||||||
with open(no_cursors_file, "rb") as cur.fp:
|
with open(no_cursors_file, "rb") as cur.fp:
|
||||||
self.assertRaises(TypeError, cur._open)
|
self.assertRaises(TypeError, cur._open)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user