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

Function test_walk

tests/test_tree.py:86–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85
86def test_walk():
87 tokens = MarkdownIt().parse(EXAMPLE_MARKDOWN)
88 tree = SyntaxTreeNode(tokens)
89 expected_node_types = (
90 "root",
91 "heading",
92 "inline",
93 "text",
94 "paragraph",
95 "inline",
96 "text",
97 "strong",
98 "text",
99 "text",
100 )
101 for node, expected_type in zip(tree.walk(), expected_node_types):
102 assert node.type == expected_type

Callers

nothing calls this directly

Calls 4

walkMethod · 0.95
MarkdownItClass · 0.90
SyntaxTreeNodeClass · 0.90
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…