def test_inner_html_with_unicode(): elem = lxml.html.fromstring('<p>논-아스키</p>') assert inner_html(elem) == '논-아스키'
def test_inner_html_a_little_more_complex(): elem = lxml.html.fromstring( '<div class="foo"><span>bar <span>bar</span></span> bar</div>') assert inner_html(elem) == '<span>bar <span>bar</span></span> bar'
def test_inner_html_with_self_closing_element(): elem = lxml.html.fromstring('<img src="http://nowhere.com/nothing.jpg" />') assert inner_html(elem) == ''
def test_inner_html(): elem = lxml.html.fromstring('<p>hello,<br>world!</p>') assert inner_html(elem) == 'hello,<br>world!'
def test_inner_html_with_unicode(): elem = lxml.html.fromstring(u'<p>논-아스키</p>') assert inner_html(elem) == u'논-아스키'