from nose.tools import assert_equals from lxml import etree from stringify import stringify_children def test_stringify(): html = '''Hi
there Bruce!
''' xml = etree.fromstring(html) out = stringify_children(xml) assert_equals(out, '''Hi
there Bruce!
''')