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

Method test_cdata

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

Source from the content-addressed store, hash-verified

395 self.assertEqual(e.get('tag'), 'bar')
396
397 def test_cdata(self):
398 # Test CDATA handling (etc).
399
400 self.serialize_check(ET.XML("<tag>hello</tag>"),
401 '<tag>hello</tag>')
402 self.serialize_check(ET.XML("<tag>&#104;&#101;&#108;&#108;&#111;</tag>"),
403 '<tag>hello</tag>')
404 self.serialize_check(ET.XML("<tag><![CDATA[hello]]></tag>"),
405 '<tag>hello</tag>')
406
407 def test_file_init(self):
408 stringfile = io.BytesIO(SAMPLE_XML.encode("utf-8"))

Callers

nothing calls this directly

Calls 1

serialize_checkMethod · 0.95

Tested by

no test coverage detected