def test_known_keyword(self): cell = CellInfo(CellContent(ContentType.USER_KEYWORD, 'Known', 'my_source'), CellPosition(CellType.KEYWORD, None)) msg = TipMessage(cell) assert_true(msg) assert_equal(str(msg), html_escape(_TooltipMessage.KEYWORD % 'my_source'))
def set_content(self, content, title=None, html=True): color = ''.join(hex(item)[2:] for item in POPUP_BACKGROUND) if not html: content = utils.html_escape(content, formatting=True) self._current_details = '<body bgcolor=#%s>%s</body>' % (color, content) self._details.SetPage(self._current_details) self._detached_title = title
def test_known_keyword(self): cell = CellInfo(CellContent(ContentType.USER_KEYWORD, 'Known', 'my_source'), CellPosition(CellType.KEYWORD, None)) msg = TipMessage(cell) assert_true(msg) assert_equals(str(msg), html_escape(_TooltipMessage.KEYWORD % 'my_source'))
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._parse_args(self.item)), html_escape(self.doc, formatting=True))
def TipMessage(cell): if not cell: return '' tip = _TooltipMessage(cell) if not cell.for_loop \ else _ForLoopTooltipMessage(cell) return html_escape(unicode(tip))
def test_unknown_keyword(self): cell = CellInfo(CellContent(ContentType.STRING, 'What?'), CellPosition(CellType.KEYWORD, None)) msg = TipMessage(cell) assert_true(msg) assert_equals(str(msg), html_escape(_TooltipMessage.KEYWORD_NOT_FOUND))
def TipMessage(cell): if not cell: return '' tip = _TooltipMessage(cell) if not cell.for_loop \ else _ForLoopTooltipMessage(cell) return html_escape(str(tip)).replace('\n', '<br />')
def get_column_values(self, item): return [item.name, utils.html_escape(item.value), ListToStringFormatter(item.comment).value]
def get_column_values(self, item): return [ item.name, utils.html_escape(item.value), ListToStringFormatter(item.comment).value ]
def TipMessage(cell): if not cell: return "" tip = _TooltipMessage(cell) if not cell.for_loop else _ForLoopTooltipMessage(cell) return html_escape(unicode(tip))
def visible_value(self): return utils.html_escape(utils.unescape(self.value), formatting=True)