Exemplo n.º 1
0
def test_inner_html_with_unicode():
    elem = lxml.html.fromstring('<p>논-아스키</p>')
    assert inner_html(elem) == '논-아스키'
Exemplo n.º 2
0
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'
Exemplo n.º 3
0
def test_inner_html_with_self_closing_element():
    elem = lxml.html.fromstring('<img src="http://nowhere.com/nothing.jpg" />')
    assert inner_html(elem) == ''
Exemplo n.º 4
0
def test_inner_html():
    elem = lxml.html.fromstring('<p>hello,<br>world!</p>')
    assert inner_html(elem) == 'hello,<br>world!'
Exemplo n.º 5
0
def test_inner_html_with_unicode():
    elem = lxml.html.fromstring(u'<p>논-아스키</p>')
    assert inner_html(elem) == u'논-아스키'
Exemplo n.º 6
0
def test_inner_html_with_self_closing_element():
    elem = lxml.html.fromstring('<img src="http://nowhere.com/nothing.jpg" />')
    assert inner_html(elem) == ''
Exemplo n.º 7
0
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'
Exemplo n.º 8
0
def test_inner_html():
    elem = lxml.html.fromstring('<p>hello,<br>world!</p>')
    assert inner_html(elem) == 'hello,<br>world!'