mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2197: Slightly cryptic error message for missing index.rst file
This commit is contained in:
parent
2bcf92dfb0
commit
7bb685bbe9
1
CHANGES
1
CHANGES
@ -26,6 +26,7 @@ Bugs fixed
|
||||
* #2201: Fix wrong table caption for tables with over 30 rows
|
||||
* #2213: Set <blockquote> in the classic theme to fit with <p>
|
||||
* #1815: Fix linkcheck does not raise an exception if warniserror set to true and link is broken
|
||||
* #2197: Fix slightly cryptic error message for missing index.rst file
|
||||
|
||||
Release 1.3.3 (released Dec 2, 2015)
|
||||
====================================
|
||||
|
@ -618,8 +618,8 @@ class BuildEnvironment:
|
||||
self._read_serial(docnames, app)
|
||||
|
||||
if config.master_doc not in self.all_docs:
|
||||
self.warn(None, 'master file %s not found' %
|
||||
self.doc2path(config.master_doc))
|
||||
raise SphinxError('master file %s not found' %
|
||||
self.doc2path(config.master_doc))
|
||||
|
||||
self.app = None
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user