MCPcopy
hub / github.com/sphinx-doc/sphinx / test_reversed_toctree

Function test_reversed_toctree

tests/test_directives/test_directive_other.py:131–141  ·  view source on GitHub ↗
(app)

Source from the content-addressed store, hash-verified

129
130@pytest.mark.sphinx('html', testroot='toctree-glob')
131def test_reversed_toctree(app):
132 text = '.. toctree::\n :reversed:\n\n foo\n bar/index\n baz\n'
133
134 app.env.find_files(app.config, app.builder)
135 doctree = restructuredtext.parse(app, text, 'index')
136 assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])
137 assert_node(
138 extract_node(doctree, 0, 0),
139 entries=[(None, 'baz'), (None, 'bar/index'), (None, 'foo')],
140 includefiles=['baz', 'bar/index', 'foo'],
141 )
142
143
144@pytest.mark.sphinx('html', testroot='toctree-glob')

Callers

nothing calls this directly

Calls 4

assert_nodeFunction · 0.90
extract_nodeFunction · 0.90
find_filesMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…