Organise tests into directories

This commit is contained in:
Adam Turner
2024-01-17 02:38:46 +00:00
parent 841f2bd9b7
commit 462404cb25
121 changed files with 467 additions and 442 deletions

View File

@@ -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)