mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Organise tests into directories
This commit is contained in:
@@ -6,7 +6,7 @@ import pytest
|
||||
|
||||
@pytest.mark.sphinx(testroot='toctree-glob')
|
||||
def test_relations(app, status, warning):
|
||||
app.builder.build_all()
|
||||
app.build(force_all=True)
|
||||
assert app.builder.relations['index'] == [None, None, 'foo']
|
||||
assert app.builder.relations['foo'] == ['index', 'index', 'bar/index']
|
||||
assert app.builder.relations['bar/index'] == ['index', 'foo', 'bar/bar_1']
|
||||
@@ -23,7 +23,7 @@ def test_relations(app, status, warning):
|
||||
|
||||
@pytest.mark.sphinx('singlehtml', testroot='toctree-empty')
|
||||
def test_singlehtml_toctree(app, status, warning):
|
||||
app.builder.build_all()
|
||||
app.build(force_all=True)
|
||||
try:
|
||||
app.builder._get_local_toctree('index')
|
||||
except AttributeError:
|
||||
@@ -36,4 +36,4 @@ def test_numbered_toctree(app, status, warning):
|
||||
index = (app.srcdir / 'index.rst').read_text(encoding='utf8')
|
||||
index = re.sub(':numbered:.*', ':numbered: 1', index)
|
||||
(app.srcdir / 'index.rst').write_text(index, encoding='utf8')
|
||||
app.builder.build_all()
|
||||
app.build(force_all=True)
|
||||
|
||||
Reference in New Issue
Block a user