mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 10:56:18 +03:00
Merge pull request #2841 from radarhere/tempfile
Changed test to use tempfile
This commit is contained in:
commit
79f2ae0c75
|
@ -515,10 +515,11 @@ class TestImage(PillowTestCase):
|
||||||
# https://github.com/python-pillow/Pillow/issues/835
|
# https://github.com/python-pillow/Pillow/issues/835
|
||||||
# Arrange
|
# Arrange
|
||||||
test_file = 'Tests/images/hopper.png'
|
test_file = 'Tests/images/hopper.png'
|
||||||
|
temp_file = self.tempfile("temp.jpg")
|
||||||
|
|
||||||
# Act/Assert
|
# Act/Assert
|
||||||
with Image.open(test_file) as im:
|
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):
|
class MockEncoder(object):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user