aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r--tests/test_apis.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py
index 8cb2c66..f89dba9 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -380,6 +380,20 @@ class testETreeComments(unittest.TestCase):
'<!--foo-->\n')
+class testElementTailTests(unittest.TestCase):
+ """ Element Tail Tests """
+ def setUp(self):
+ self.pretty = markdown.treeprocessors.PrettifyTreeprocessor()
+
+ def testBrTailNoNewline(self):
+ """ Test that last <br> in tree has a new line tail """
+ root = markdown.util.etree.Element('root')
+ br = markdown.util.etree.SubElement(root, 'br')
+ self.assertEqual(br.tail, None)
+ self.pretty.run(root)
+ self.assertEqual(br.tail, "\n")
+
+
class testSerializers(unittest.TestCase):
""" Test the html and xhtml serializers. """