summaryrefslogtreecommitdiff
path: root/tests/test_directive_code.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-01-03 00:57:31 +0900
committerGitHub <noreply@github.com>2022-01-03 00:57:31 +0900
commit08a87d945a8ca7770c589ea878e9b095ed35e6d4 (patch)
tree9ceec80c4117bef6e2f0a960c85d99237475cfe7 /tests/test_directive_code.py
parenta0919172190ee147d44288a0ac67712870ca965e (diff)
parent05a898ecb4ff8e654a053a1ba5131715a4514812 (diff)
downloadsphinx-git-08a87d945a8ca7770c589ea878e9b095ed35e6d4.tar.gz
Merge pull request #10044 from tk0miya/9777_Node.findall
Migrate to Node.findall() from Node.traverse()
Diffstat (limited to 'tests/test_directive_code.py')
-rw-r--r--tests/test_directive_code.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py
index 9626e73cb..d8244db6a 100644
--- a/tests/test_directive_code.py
+++ b/tests/test_directive_code.py
@@ -553,7 +553,7 @@ def test_literalinclude_pydecorators(app, status, warning):
def test_code_block_highlighted(app, status, warning):
app.builder.build(['highlight'])
doctree = app.env.get_doctree('highlight')
- codeblocks = list(doctree.traverse(nodes.literal_block))
+ codeblocks = list(doctree.findall(nodes.literal_block))
assert codeblocks[0]['language'] == 'default'
assert codeblocks[1]['language'] == 'python2'