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

Method test_ancestors

tests/test_apis.py:960–968  ·  view source on GitHub ↗

Test that an extension can exclude parent tags.

(self)

Source from the content-addressed store, hash-verified

958 self.md = markdown.Markdown(extensions=[TestAncestorExclusion.AncestorExtension()])
959
960 def test_ancestors(self):
961 """ Test that an extension can exclude parent tags. """
962 test = """
963Some +test+ and a [+link+](http://test.com)
964"""
965 result = """<p>Some <strong>test</strong> and a <a href="http://test.com">+link+</a></p>"""
966
967 self.md.reset()
968 self.assertEqual(self.md.convert(test), result)
969
970 def test_ancestors_tail(self):
971 """ Test that an extension can exclude parent tags when dealing with a tail. """

Callers

nothing calls this directly

Calls 2

convertMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected