def test_example(): doc = parseHTML('<html><p>Cont<br>ent</p></html>') text = etree_text(doc.find('.//p')) assert text == 'Content'
def test_brokenText(): html = '<html><body>a<br/>b<br/>c</body></html>' et = parseHTML(html) assert etree_text(et.find('.//body')) == 'abc'