예제 #1
0
def test_unescape_invalid():
    entity = "&foobar;"
    assert unescape(entity) == entity
예제 #2
0
def test_unescape_int():
    entity = " "
    assert unescape(entity) == u"\xa0"
예제 #3
0
def test_unescape_hex():
    entity = " "
    assert unescape(entity) == u"\xa0"
예제 #4
0
def test_unescape_invalid_hex():
    entity = "&#xzz;"
    assert unescape(entity) == entity
예제 #5
0
def test_unescape(entity, expected):
    actual = unescape(entity)
    assert actual == expected