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

Function test_toctree

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

Source from the content-addressed store, hash-verified

20
21@pytest.mark.sphinx('html', testroot='toctree-glob')
22def test_toctree(app):
23 text = '.. toctree::\n\n foo\n bar/index\n baz\n'
24
25 app.env.find_files(app.config, app.builder)
26 doctree = restructuredtext.parse(app, text, 'index')
27 assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])
28 assert_node(
29 extract_node(doctree, 0, 0),
30 entries=[(None, 'foo'), (None, 'bar/index'), (None, 'baz')],
31 includefiles=['foo', 'bar/index', 'baz'],
32 )
33
34
35@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…