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

Method testQNameEscaping

tests/test_apis.py:637–644  ·  view source on GitHub ↗

Test `QName` escaping.

(self)

Source from the content-addressed store, hash-verified

635 self.assertRaises(ValueError, markdown.serializers.to_xhtml_string, el)
636
637 def testQNameEscaping(self):
638 """ Test `QName` escaping. """
639 qname = etree.QName('<&"test\nescaping">', 'div')
640 el = etree.Element(qname)
641 self.assertEqual(
642 markdown.serializers.to_xhtml_string(el),
643 '<div xmlns="&lt;&amp;&quot;test&#10;escaping&quot;&gt;"></div>'
644 )
645
646 def testQNamePreEscaping(self):
647 """ Test `QName` that is already partially escaped. """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected