def test_indent(self): self.content.node = etree.fromstring(self.INDENT) format = format_tei(self.content) # needs *both* line formatting and rend indent formatting self.assert_(format.startswith('<p><span style="padding-left:2.5em">')) self.assert_(format.endswith('</span></p>'))
def test_quote(self): self.content.node = etree.fromstring(self.QUOTE) format = format_tei(self.content) self.assertEqual('<blockquote>(For Eavan)</blockquote>', format)
def test_epigraph(self): self.content.node = etree.fromstring(self.EPIGRAPH) format = format_tei(self.content) self.assert_(format.startswith('<div class="epigraph">')) self.assert_(format.endswith('</div>'))
def test_head(self): self.content.node = etree.fromstring(self.HEAD) format = format_tei(self.content) self.assertEqual('<strong>Lake Isle of Innisfree</strong>', format)
def test_line(self): lnode = list(self.content.node.iterchildren())[0] self.content.node = lnode format = format_tei(self.content) self.assert_(format.startswith('<p>')) self.assert_(format.endswith('</p>'))
def test_linegroup(self): format = format_tei(self.content) self.assert_(format.startswith('<div class="linegroup">')) self.assert_(format.endswith('</div>'))