MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / testQNamePreEscaping

Method testQNamePreEscaping

tests/test_apis.py:622–629  ·  view source on GitHub ↗

Test `QName` that is already partially escaped.

(self)

Source from the content-addressed store, hash-verified

620 )
621
622 def testQNamePreEscaping(self):
623 """ Test `QName` that is already partially escaped. """
624 qname = etree.QName('<&"test
escaping">', 'div')
625 el = etree.Element(qname)
626 self.assertEqual(
627 markdown.serializers.to_xhtml_string(el),
628 '<div xmlns="&lt;&amp;&quot;test&#10;escaping&quot;&gt;"></div>'
629 )
630
631 def buildExtension(self):
632 """ Build an extension which registers `fakeSerializer`. """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected