def details(self): return ('<table>' '<tr><td><i>Name:</i></td><td>%s</td></tr>' '<tr><td><i>Source:</i></td><td>%s <%s></td></tr>' '<tr><td><i>Arguments:</i></td><td>%s</td></tr>' '</table>' '<table>' '<tr><td>%s</td></tr>' '</table>') % \ (self._name(self.item), self._source(self.item), self._type, self._format_args(self.arguments), utils.html_format(self.doc))
def details(self): return ( "<table>" "<tr><td><i>Name:</i></td><td>%s</td></tr>" "<tr><td><i>Source:</i></td><td>%s <%s></td></tr>" "<tr><td><i>Arguments:</i></td><td>%s</td></tr>" "</table>" "<table>" "<tr><td>%s</td></tr>" "</table>" ) % ( self._name(self.item), self._source(self.item), self._type, self._format_args(self.arguments), html_format(self.doc), )
def visible_value(self): return utils.html_format(utils.unescape(self.value))
def test_formatting(self): formated = utils.html_format('| foo | bar |\n| zoo | zaa |\n\nhello') self.assertEqual( '<table border="1">\n<tr>\n<td>foo</td>\n<td>bar</td>\n</tr>\n<tr>\n<td>zoo</td>\n<td>zaa</td>\n</tr>\n</table>\n<p>hello</p>', formated)
def test_formatting(self): formated = utils.html_format('| foo | bar |\n| zoo | zaa |\n\nhello') self.assertEqual('<table border="1">\n<tr>\n<td>foo</td>\n<td>bar</td>\n</tr>\n<tr>\n<td>zoo</td>\n<td>zaa</td>\n</tr>\n</table>\n<p>hello</p>', formated)