MCPcopy Index your code
hub / github.com/python/cpython / test_tostringlist_invariant

Method test_tostringlist_invariant

Lib/test/test_xml_etree.py:4446–4453  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4444 '''<site />'''.encode("utf-16"))
4445
4446 def test_tostringlist_invariant(self):
4447 root = ET.fromstring('<tag>foo</tag>')
4448 self.assertEqual(
4449 ET.tostring(root, 'unicode'),
4450 ''.join(ET.tostringlist(root, 'unicode')))
4451 self.assertEqual(
4452 ET.tostring(root, 'utf-16'),
4453 b''.join(ET.tostringlist(root, 'utf-16')))
4454
4455 def test_short_empty_elements(self):
4456 root = ET.fromstring('<tag>a<x />b<y></y>c</tag>')

Callers

nothing calls this directly

Calls 3

fromstringMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected