Merge pull request #480 from cgohlke/patch-2

Add test for issue #479
This commit is contained in:
Alex Clark ☺ 2014-01-11 12:33:06 -08:00
commit dff6eee541

View File

@ -2,6 +2,7 @@ from tester import *
from PIL import Image, EpsImagePlugin
import sys
import io
if EpsImagePlugin.gs_windows_binary == False:
# already checked. Not there.
@ -54,6 +55,18 @@ def test_sanity():
assert_equal(image2_scale2.size, (720, 504))
assert_equal(image2_scale2.format, "EPS")
def test_file_object():
#issue 479
image1 = Image.open(file1)
with open(tempfile('temp_file.eps'), 'wb') as fh:
image1.save(fh, 'EPS')
def test_iobase_object():
#issue 479
image1 = Image.open(file1)
with io.open(tempfile('temp_iobase.eps'), 'wb') as fh:
image1.save(fh, 'EPS')
def test_render_scale1():
#We need png support for these render test
codecs = dir(Image.core)
@ -93,4 +106,3 @@ def test_render_scale2():
image2_scale2_compare = Image.open(file2_compare_scale2).convert("RGB")
image2_scale2_compare.load()
assert_image_similar(image2_scale2, image2_scale2_compare, 10)