From 701f4aaf6ed329ea5dd2afc99788a7413ff89cc4 Mon Sep 17 00:00:00 2001 From: Henri Chain Date: Tue, 24 May 2016 11:42:23 +0200 Subject: [PATCH] close right after write --- test/test_foreign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_foreign.py b/test/test_foreign.py index 740d34e0..24756f13 100755 --- a/test/test_foreign.py +++ b/test/test_foreign.py @@ -115,6 +115,7 @@ class TestForeign(unittest.TestCase): buf = Vips.call(saver, im) f = NamedTemporaryFile(suffix=suf, delete=False) f.write(buf) + f.close() x = Vips.Image.new_from_file(f.name) self.assertEqual(im.width, x.width) @@ -122,7 +123,6 @@ class TestForeign(unittest.TestCase): self.assertEqual(im.bands, x.bands) self.assertLessEqual((im - x).abs().max(), max_diff) - f.close() os.unlink(f.name) def test_vips(self):