diff options
author | Glandos <bugs-github@antipoul.fr> | 2018-06-20 02:14:29 +0200 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2018-06-19 20:14:29 -0400 |
commit | 2d2183d1beaf0fb2a86461bceb6599f1bcb02605 (patch) | |
tree | d4b2951e09599b69509f645f8a0e6a84e3ddb1a3 /tests | |
parent | d321e798228f6db61d0d477b756a34a8f1d5b8d0 (diff) | |
download | markdown-2d2183d1beaf0fb2a86461bceb6599f1bcb02605.tar.gz markdown-2d2183d1beaf0fb2a86461bceb6599f1bcb02605.tar.bz2 markdown-2d2183d1beaf0fb2a86461bceb6599f1bcb02605.zip |
Implement reset() for Meta extension (#672)
Fixes #671
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_extensions.py | 14 |
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. """ |