tests: add autocropmarks test & subject value
authorrgbecker
Thu, 12 Feb 2009 18:01:35 +0000
changeset 3108 1e67b49dbf22
parent 3107 f996e2f6bc46
child 3109 e90108bdf932
tests: add autocropmarks test & subject value
tests/test_pdfgen_general.py
tests/test_platypus_general.py
--- a/tests/test_pdfgen_general.py	Thu Feb 12 12:15:35 2009 +0000
+++ b/tests/test_pdfgen_general.py	Thu Feb 12 18:01:35 2009 +0000
@@ -931,6 +931,17 @@
         # Output the PDF
         c.save()    
 
+    def test2(self):
+        c=canvas.Canvas('test_pdfgen_autocropmarks.pdf')
+        c._cropMarks=True
+        c.saveState()
+        c.setStrokeColor((1,0,0))
+        c.rect(0,0,c._pagesize[0],c._pagesize[1],stroke=1)
+        c.restoreState()
+        c.drawString(72,c._pagesize[1]-72,'Auto Crop Marks')
+        c.showPage()
+        c.save()
+
 def makeSuite():
     return makeSuiteForClasses(PdfgenTestCase)
 
--- a/tests/test_platypus_general.py	Thu Feb 12 12:15:35 2009 +0000
+++ b/tests/test_platypus_general.py	Thu Feb 12 18:01:35 2009 +0000
@@ -552,7 +552,7 @@
 
 
 def run():
-    doc = AndyTemplate(outputfile('test_platypus_general.pdf'))
+    doc = AndyTemplate(outputfile('test_platypus_general.pdf'),subject='test0')
     #doc.setPageCallBack(showProgress)
     commentary = getCommentary()
     examples = getExamples()