Use fp instead of filename

This commit is contained in:
hugovk 2014-12-11 13:20:11 +02:00
parent 385ad47a9b
commit 6da05b4026

View File

@ -12,13 +12,14 @@ class TestPsDraw(PillowTestCase):
from PIL import Image
from PIL import PSDraw
tempfile = self.tempfile('temp.ps')
fp = open(tempfile, "wb")
im = Image.open("Tests/images/hopper.ppm")
title = "hopper"
box = (1*72, 2*72, 7*72, 10*72) # in points
# Act
ps = PSDraw.PSDraw(tempfile)
ps = PSDraw.PSDraw(fp)
ps.begin_document(title)
# draw the image (75 dpi)
@ -31,6 +32,7 @@ class TestPsDraw(PillowTestCase):
ps.text((4*72-w/2, 1*72-h), title)
ps.end_document()
fp.close()
# Assert
# TODO