mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use Node.findall
This commit is contained in:
@@ -591,7 +591,7 @@ def test_linenothreshold(app, status, warning):
|
||||
def test_code_block_dedent(app, status, warning):
|
||||
app.builder.build(['dedent'])
|
||||
doctree = app.env.get_doctree('dedent')
|
||||
codeblocks = list(doctree.traverse(nodes.literal_block))
|
||||
codeblocks = [*doctree.findall(nodes.literal_block)]
|
||||
# Note: comparison string should not have newlines at the beginning or end
|
||||
text_0_indent = '''First line
|
||||
Second line
|
||||
|
||||
Reference in New Issue
Block a user