mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-19 12:33:16 +03:00
Simple test for saving to PDF
This commit is contained in:
parent
74514fa1f5
commit
f165d2034f
17
Tests/test_file_pdf.py
Normal file
17
Tests/test_file_pdf.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
from tester import *
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
|
||||||
|
def test_to_pdf():
|
||||||
|
# Arrange
|
||||||
|
im = lena()
|
||||||
|
outfile = tempfile("temp.pdf")
|
||||||
|
|
||||||
|
# Act
|
||||||
|
im.save(outfile)
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
assert_true(os.path.isfile(outfile))
|
||||||
|
assert_greater(os.path.getsize(outfile), 0)
|
||||||
|
|
||||||
|
# End of file
|
Loading…
Reference in New Issue
Block a user