MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / test_spec

Function test_spec

tests/test_cmark_spec/test_spec.py:22–36  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

20
21@pytest.mark.parametrize("entry", json.loads(TESTS_INPUT.read_text()))
22def test_spec(entry):
23 md = MarkdownIt("commonmark")
24 output = md.render(entry["markdown"])
25 expected = entry["html"]
26
27 if entry["example"] == 596:
28 # this doesn't have any bearing on the output
29 output = output.replace("mailto", "MAILTO")
30 if entry["example"] in [218, 239, 240]:
31 # this doesn't have any bearing on the output
32 output = output.replace(
33 "<blockquote></blockquote>", "<blockquote>\n</blockquote>"
34 )
35
36 assert output == expected

Callers

nothing calls this directly

Calls 2

renderMethod · 0.95
MarkdownItClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…