Use context managers to ensure Pillow images are closed
This commit is contained in:
+2
-1
@@ -38,7 +38,8 @@ def test_colormap_backgroundnorm(resources):
|
||||
def crom_pix(resources):
|
||||
pix = lept.Pix.open(resources / 'crom.png')
|
||||
im = Image.open(resources / 'crom.png')
|
||||
return pix, im
|
||||
yield pix, im
|
||||
im.close()
|
||||
|
||||
|
||||
def test_pix_basic(crom_pix):
|
||||
|
||||
Reference in New Issue
Block a user