aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_extensions.py
diff options
context:
space:
mode:
authorGlandos <bugs-github@antipoul.fr>2018-06-20 02:14:29 +0200
committerWaylan Limberg <waylan.limberg@icloud.com>2018-06-19 20:14:29 -0400
commit2d2183d1beaf0fb2a86461bceb6599f1bcb02605 (patch)
treed4b2951e09599b69509f645f8a0e6a84e3ddb1a3 /tests/test_extensions.py
parentd321e798228f6db61d0d477b756a34a8f1d5b8d0 (diff)
downloadmarkdown-2d2183d1beaf0fb2a86461bceb6599f1bcb02605.tar.gz
markdown-2d2183d1beaf0fb2a86461bceb6599f1bcb02605.tar.bz2
markdown-2d2183d1beaf0fb2a86461bceb6599f1bcb02605.zip
Implement reset() for Meta extension (#672)
Fixes #671
Diffstat (limited to 'tests/test_extensions.py')
-rw-r--r--tests/test_extensions.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_extensions.py b/tests/test_extensions.py
index aee9bac..35eaf1d 100644
--- a/tests/test_extensions.py
+++ b/tests/test_extensions.py
@@ -454,6 +454,20 @@ The body. This is paragraph one.'''
self.assertEqual(self.md.convert(text), '')
self.assertEqual(self.md.Meta, {'title': ['No newline']})
+ def testMetaDataReset(self):
+ """ Test that reset call remove Meta entirely """
+
+ text = '''Title: A Test Doc.
+Author: Waylan Limberg
+ John Doe
+Blank_Data:
+
+The body. This is paragraph one.'''
+ self.md.convert(text)
+
+ self.md.reset()
+ self.assertEqual(self.md.Meta, {})
+
class TestWikiLinks(unittest.TestCase):
""" Test Wikilinks Extension. """