()
| 43 | |
| 44 | |
| 45 | def test_sibling_traverse(): |
| 46 | tokens = MarkdownIt().parse(EXAMPLE_MARKDOWN) |
| 47 | tree = SyntaxTreeNode(tokens) |
| 48 | paragraph_inline_node = tree.children[1].children[0] |
| 49 | text_node = paragraph_inline_node.children[0] |
| 50 | assert text_node.type == "text" |
| 51 | strong_node = text_node.next_sibling |
| 52 | assert strong_node |
| 53 | assert strong_node.type == "strong" |
| 54 | another_text_node = strong_node.next_sibling |
| 55 | assert another_text_node |
| 56 | assert another_text_node.type == "text" |
| 57 | assert another_text_node.next_sibling is None |
| 58 | assert another_text_node.previous_sibling.previous_sibling == text_node # type: ignore |
| 59 | assert text_node.previous_sibling is None |
| 60 | |
| 61 | |
| 62 | def test_pretty(file_regression): |
nothing calls this directly
no test coverage detected
searching dependent graphs…