aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2018-07-31 14:12:49 -0400
committerGitHub <noreply@github.com>2018-07-31 14:12:49 -0400
commit1e7fd3f236f63f9ca9b85de9cd172b77e7f9be80 (patch)
tree480f31abf71a8c205d04f961478fd579680b570f /tests/test_apis.py
parent7dad12c07e3e701da42474696398cb32e5c9979f (diff)
downloadmarkdown-1e7fd3f236f63f9ca9b85de9cd172b77e7f9be80.tar.gz
markdown-1e7fd3f236f63f9ca9b85de9cd172b77e7f9be80.tar.bz2
markdown-1e7fd3f236f63f9ca9b85de9cd172b77e7f9be80.zip
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.
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r--tests/test_apis.py7
1 files changed, 4 insertions, 3 deletions
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 <br> in tree has a new line tail """