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

Method testQNameEscaping

tests/test_apis.py:613–620  ·  view source on GitHub ↗

Test `QName` escaping.

(self)

Source from the content-addressed store, hash-verified

611 self.assertRaises(ValueError, markdown.serializers.to_xhtml_string, el)
612
613 def testQNameEscaping(self):
614 """ Test `QName` escaping. """
615 qname = etree.QName('<&"test\nescaping">', 'div')
616 el = etree.Element(qname)
617 self.assertEqual(
618 markdown.serializers.to_xhtml_string(el),
619 '<div xmlns="&lt;&amp;&quot;test&#10;escaping&quot;&gt;"></div>'
620 )
621
622 def testQNamePreEscaping(self):
623 """ Test `QName` that is already partially escaped. """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected