51 frame1 = Frame(2.5*cm, 2.5*cm, 15*cm, 25*cm, id='F1') |
51 frame1 = Frame(2.5*cm, 2.5*cm, 15*cm, 25*cm, id='F1') |
52 self.allowSplitting = 0 |
52 self.allowSplitting = 0 |
53 apply(BaseDocTemplate.__init__, (self, filename), kw) |
53 apply(BaseDocTemplate.__init__, (self, filename), kw) |
54 template = PageTemplate('normal', [frame1], myMainPageFrame) |
54 template = PageTemplate('normal', [frame1], myMainPageFrame) |
55 self.addPageTemplates(template) |
55 self.addPageTemplates(template) |
|
56 |
|
57 |
|
58 class ParagraphCorners(unittest.TestCase): |
|
59 "some corner cases which should parse" |
|
60 def check(text,bt = getSampleStyleSheet()['BodyText']): |
|
61 try: |
|
62 P = Paragraph(text,st) |
|
63 except: |
|
64 raise AssertionError("'%s' should parse"%text) |
|
65 |
|
66 def test0(self): |
|
67 self.check('<para />') |
|
68 self.check('<para/>') |
|
69 self.check('\t\t\t\n\n\n<para />') |
|
70 self.check('\t\t\t\n\n\n<para/>') |
|
71 self.check('<para\t\t\t\t/>') |
|
72 self.check('<para></para>') |
|
73 self.check('<para> </para>') |
|
74 self.check('\t\t\n\t\t\t <para> </para>') |
|
75 |
56 |
76 |
57 |
77 |
58 class ParagraphSplitTestCase(unittest.TestCase): |
78 class ParagraphSplitTestCase(unittest.TestCase): |
59 "Test multi-page splitting of paragraphs (eyeball-test)." |
79 "Test multi-page splitting of paragraphs (eyeball-test)." |
60 |
80 |