From 1e7fd3f236f63f9ca9b85de9cd172b77e7f9be80 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Tue, 31 Jul 2018 14:12:49 -0400 Subject: Move isBlockLevel to class. (#693) Allows users and/or extensions to alter the list of block level elements. The old implementation remains with a DeprecationWarning. Fixes #575. --- tests/test_apis.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/test_apis.py') diff --git a/tests/test_apis.py b/tests/test_apis.py index 834299b..71a8555 100644 --- a/tests/test_apis.py +++ b/tests/test_apis.py @@ -510,7 +510,8 @@ class testETreeComments(unittest.TestCase): def testCommentIsBlockLevel(self): """ Test that an ElementTree Comment is recognized as BlockLevel. """ - self.assertFalse(markdown.util.isBlockLevel(self.comment.tag)) + md = markdown.Markdown() + self.assertFalse(md.is_block_level(self.comment.tag)) def testCommentSerialization(self): """ Test that an ElementTree Comment serializes properly. """ @@ -521,7 +522,7 @@ class testETreeComments(unittest.TestCase): def testCommentPrettify(self): """ Test that an ElementTree Comment is prettified properly. """ - pretty = markdown.treeprocessors.PrettifyTreeprocessor() + pretty = markdown.treeprocessors.PrettifyTreeprocessor(markdown.Markdown()) pretty.run(self.comment) self.assertEqual( markdown.serializers.to_html_string(self.comment), @@ -532,7 +533,7 @@ class testETreeComments(unittest.TestCase): class testElementTailTests(unittest.TestCase): """ Element Tail Tests """ def setUp(self): - self.pretty = markdown.treeprocessors.PrettifyTreeprocessor() + self.pretty = markdown.treeprocessors.PrettifyTreeprocessor(markdown.Markdown()) def testBrTailNoNewline(self): """ Test that last
in tree has a new line tail """ -- cgit v1.2.3