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

Method test_cdata_section_content

Lib/test/test_htmlparser.py:970–982  ·  view source on GitHub ↗
(self, content)

Source from the content-addressed store, hash-verified

968 ' }\n'),
969 ])
970 def test_cdata_section_content(self, content):
971 # See "13.2.5.42 Markup declaration open state",
972 # "13.2.5.69 CDATA section state", and issue bpo-32876.
973 html = f'<svg><text y="100"><![CDATA[{content}]]></text></svg>'
974 expected = [
975 ('starttag', 'svg', []),
976 ('starttag', 'text', [('y', '100')]),
977 ('unknown decl', 'CDATA[' + content),
978 ('endtag', 'text'),
979 ('endtag', 'svg'),
980 ]
981 self._run_check(html, expected)
982 self._run_check(html, expected, collector=EventCollector(autocdata=True))
983
984 def test_cdata_section(self):
985 # See "13.2.5.42 Markup declaration open state".

Callers

nothing calls this directly

Calls 2

EventCollectorClass · 0.85
_run_checkMethod · 0.80

Tested by

no test coverage detected