Example #1
0
    def _write_contents(self, container, actual_cfg, *args, **kwargs):
        # table boilerplate
        model = {'df': self.df,
                 'header_iterable': self._get_header_iterable(),
                 'insert_additional_html': self.insert_additional_html,
                 'create_thead_level_css': self.create_thead_level_css,
                 'create_table_level_css': self.create_table_level_css,
                 'create_table_level_css_class': self.create_table_level_css_class,
                 'create_row_level_css': self.create_row_level_css,
                 'create_cell_level_css': self.create_cell_level_css,
                 'modify_cell_content': self.modify_cell_content}

        table_html = _table_tmpl.render(**model)
        soup = parse(table_html)
        table = soup.find("table")
        container.append(table)
        return
Example #2
0
 def _write_contents(self, container, *args, **kwargs):
     for child in list(parse(self._contents).children):
         container.append(child)
Example #3
0
 def _write_contents(self, container, *args, **kwargs):
     container.append(parse(self._contents))
Example #4
0
def test_parse():
    el = h.parse('<html>text</html>')
    assert el.text == 'text'