diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-04-09 01:35:46 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-09 01:35:46 +0900 |
commit | ce5d66e618c111b115a9bb7b1401a26483fcfa8f (patch) | |
tree | 9dbc41be360599c590ceaedebafbf89abdcd092d /tests/test_environment_toctree.py | |
parent | dfc0a2879e520b14242ca5e38c75a0de0870087b (diff) | |
parent | 5604f9c420c28b95c9e0e9c3a3656cb70f6ab060 (diff) | |
download | sphinx-git-ce5d66e618c111b115a9bb7b1401a26483fcfa8f.tar.gz |
Merge pull request #9053 from tk0miya/title_node_for_toctree_caption
Fix #8870: Use title node for the caption of toctree
Diffstat (limited to 'tests/test_environment_toctree.py')
-rw-r--r-- | tests/test_environment_toctree.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_environment_toctree.py b/tests/test_environment_toctree.py index 41b3f727c..85a98b61b 100644 --- a/tests/test_environment_toctree.py +++ b/tests/test_environment_toctree.py @@ -10,7 +10,7 @@ import pytest from docutils import nodes -from docutils.nodes import bullet_list, caption, comment, list_item, reference +from docutils.nodes import bullet_list, comment, list_item, reference, title from sphinx import addnodes from sphinx.addnodes import compact_paragraph, only @@ -211,7 +211,7 @@ def test_get_toctree_for(app): app.build() toctree = TocTree(app.env).get_toctree_for('index', app.builder, collapse=False) assert_node(toctree, - [compact_paragraph, ([caption, "Table of Contents"], + [compact_paragraph, ([title, "Table of Contents"], bullet_list, bullet_list, bullet_list)]) @@ -251,7 +251,7 @@ def test_get_toctree_for_collapse(app): app.build() toctree = TocTree(app.env).get_toctree_for('index', app.builder, collapse=True) assert_node(toctree, - [compact_paragraph, ([caption, "Table of Contents"], + [compact_paragraph, ([title, "Table of Contents"], bullet_list, bullet_list, bullet_list)]) @@ -283,7 +283,7 @@ def test_get_toctree_for_maxdepth(app): toctree = TocTree(app.env).get_toctree_for('index', app.builder, collapse=False, maxdepth=3) assert_node(toctree, - [compact_paragraph, ([caption, "Table of Contents"], + [compact_paragraph, ([title, "Table of Contents"], bullet_list, bullet_list, bullet_list)]) @@ -329,7 +329,7 @@ def test_get_toctree_for_includehidden(app): toctree = TocTree(app.env).get_toctree_for('index', app.builder, collapse=False, includehidden=False) assert_node(toctree, - [compact_paragraph, ([caption, "Table of Contents"], + [compact_paragraph, ([title, "Table of Contents"], bullet_list, bullet_list)]) |