From 11270135194922e0f5cfc739b69fe39f7337a0f9 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 10 Jan 2018 23:12:10 -0500 Subject: Removed deprecated HeaderId Extension. Use the TOC extension instead. --- tests/test_extensions.py | 54 ------------------------------------------------ 1 file changed, 54 deletions(-) (limited to 'tests') diff --git a/tests/test_extensions.py b/tests/test_extensions.py index 37b6fd6..5dee0fd 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -388,60 +388,6 @@ line 3 self.assertTrue('' in md.convert(text)) -class TestHeaderId(unittest.TestCase): - """ Test HeaderId Extension. """ - - def setUp(self): - self.md = markdown.Markdown(extensions=['markdown.extensions.headerid']) - - def testBasicHeaderId(self): - """ Test Basic HeaderID """ - - text = "# Some Header #" - self.assertEqual( - self.md.convert(text), - '

Some Header

' - ) - - def testNoAutoIds(self): - """ Test HeaderIDs with no auto generated IDs. """ - - text = '# Some Header\n# Another Header' - self.assertEqual( - markdown.markdown(text, extensions=[markdown.extensions.headerid.HeaderIdExtension(forceid=False)]), - '

Some Header

\n' - '

Another Header

' - ) - - def testHeaderIdWithMetaData(self): - """ Test Header IDs with MetaData extension. """ - - text = '''header_level: 2 -header_forceid: Off - -# A Header''' - self.assertEqual( - markdown.markdown(text, extensions=['markdown.extensions.headerid', 'markdown.extensions.meta']), - '

A Header

' - ) - - def testHeaderIdWithAttr_List(self): - """ Test HeaderIDs with Attr_List extension. """ - - text = '# Header1 {: #foo }\n# Header2 {: .bar }' - self.assertEqual( - markdown.markdown(text, extensions=['markdown.extensions.headerid', 'markdown.extensions.attr_list']), - '

Header1

\n' - '

Header2

' - ) - # Switch order extensions are loaded - should be no change in behavior. - self.assertEqual( - markdown.markdown(text, extensions=['markdown.extensions.attr_list', 'markdown.extensions.headerid']), - '

Header1

\n' - '

Header2

' - ) - - class TestMetaData(unittest.TestCase): """ Test MetaData extension. """ -- cgit v1.2.3