Пример #1
0
def test_example():
	doc = parseHTML('<html><p>Cont<br>ent</p></html>')
	text = etree_text(doc.find('.//p'))
	assert text == 'Content'
Пример #2
0
def test_brokenText():
	html = '<html><body>a<br/>b<br/>c</body></html>'
	et = parseHTML(html)
	assert etree_text(et.find('.//body')) == 'abc'