mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix #2197: Slightly cryptic error message for missing index.rst file
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
from six import BytesIO
|
||||
|
||||
from textwrap import dedent
|
||||
from sphinx.errors import SphinxError
|
||||
|
||||
from util import with_app, rootdir, tempdir, SkipTest, TestApp
|
||||
|
||||
@@ -73,6 +74,16 @@ def test_build_all():
|
||||
yield verify_build, buildername, srcdir
|
||||
|
||||
|
||||
@with_app(buildername='text')
|
||||
def test_master_doc_not_found(app, status, warning):
|
||||
(app.srcdir / 'contents.txt').unlink()
|
||||
try:
|
||||
app.builder.build_all()
|
||||
assert False # SphinxError not raised
|
||||
except Exception as exc:
|
||||
assert isinstance(exc, SphinxError)
|
||||
|
||||
|
||||
@with_app(buildername='text', testroot='circular')
|
||||
def test_circular_toctree(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
Reference in New Issue
Block a user