MCPcopy Index your code
hub / github.com/Python-Markdown/markdown / testYamlMetaData

Method testYamlMetaData

tests/test_extensions.py:104–124  ·  view source on GitHub ↗

Test metadata specified as simple YAML.

(self)

Source from the content-addressed store, hash-verified

102 )
103
104 def testYamlMetaData(self):
105 """ Test metadata specified as simple YAML. """
106
107 text = '''---
108Title: A Test Doc.
109Author: [Waylan Limberg, John Doe]
110Blank_Data:
111---
112
113The body. This is paragraph one.'''
114 self.assertEqual(
115 self.md.convert(text),
116 '<p>The body. This is paragraph one.</p>'
117 )
118 self.assertEqual(
119 self.md.Meta, {
120 'author': ['[Waylan Limberg, John Doe]'],
121 'blank_data': [''],
122 'title': ['A Test Doc.']
123 }
124 )
125
126 def testMissingMetaData(self):
127 """ Test document without Meta Data. """

Callers

nothing calls this directly

Calls 1

convertMethod · 0.80

Tested by

no test coverage detected