MCPcopy Create free account
hub / github.com/ActiveState/code / test2

Function test2

recipes/Python/576445_ElementTree_Wrapper/recipe-576445.py:222–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

220 assert repr(xml(e)) == "<dict><dictent><key>foo</key><value>bar</value></dictent></dict>"
221
222def test2():
223 xml_test_data = [[xml('html', xml('body', *xml('br').join(xml('span',text) for text in ['foo','bar','baz']))),
224 "<html><body><span>foo</span><br /><span>bar</span><br /><span>baz</span></body></html>"],
225 [xml("<br/>"),"<br />"],
226 ]
227 for v1,v2 in xml_test_data:
228 assert repr(v1) == v2
229
230def runtests():
231 test1()

Callers 1

runtestsFunction · 0.70

Calls 2

xmlClass · 0.70
joinMethod · 0.45

Tested by

no test coverage detected