def test_swapNodes(): raw = r''' <u><center>Text</center></u> ''' tree, reports = cleanMarkup(raw) center_node = tree.getChildNodesByClass(Center)[0] assert not _any([p.__class__ == Underline for p in center_node.getParents()])
def test_swapNodes(): raw = r''' <u><center>Text</center></u> ''' tree, reports = cleanMarkup(raw) center_node = tree.getChildNodesByClass(Center)[0] assert not _any( [p.__class__ == Underline for p in center_node.getParents()])
def test_fixNesting2(): raw = r''' <div><div> * bla * blub </div></div> ''' tree, reports = cleanMarkup(raw) list_node = tree.getChildNodesByClass(ItemList)[0] assert not _any([p.__class__ == Div for p in list_node.getParents()])