mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Use fp instead of filename
This commit is contained in:
parent
385ad47a9b
commit
6da05b4026
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user