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

Function test_use_existing_env

tests/test_port/test_references.py:19–36  ·  view source on GitHub ↗
(data_regression)

Source from the content-addressed store, hash-verified

17
18
19def test_use_existing_env(data_regression):
20 md = MarkdownIt()
21 src = "[a]\n\n[c]: ijk"
22 env = {
23 "references": {
24 "A": {"title": "", "href": "abc", "map": [0, 1]},
25 "B": {"title": "", "href": "xyz", "map": [2, 3]},
26 }
27 }
28 tokens = md.parse(src, env)
29 data_regression.check([token.as_dict() for token in tokens])
30 assert env == {
31 "references": {
32 "A": {"title": "", "href": "abc", "map": [0, 1]},
33 "B": {"title": "", "href": "xyz", "map": [2, 3]},
34 "C": {"title": "", "href": "ijk", "map": [2, 3]},
35 }
36 }
37
38
39def test_store_labels(data_regression):

Callers

nothing calls this directly

Calls 3

parseMethod · 0.95
MarkdownItClass · 0.90
as_dictMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…