From 28119dd68dc7915b7fd2d007f9e0742f1b6744fd Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 8 Nov 2017 12:59:05 +1100 Subject: [PATCH] Changed test to use tempfile --- Tests/test_image.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/test_image.py b/Tests/test_image.py index 8187b68ac..1d729e9de 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -515,10 +515,11 @@ class TestImage(PillowTestCase): # https://github.com/python-pillow/Pillow/issues/835 # Arrange test_file = 'Tests/images/hopper.png' + temp_file = self.tempfile("temp.jpg") # Act/Assert with Image.open(test_file) as im: - self.assert_warning(None, lambda: im.save('test_img.jpg')) + self.assert_warning(None, im.save, temp_file) class MockEncoder(object):