summaryrefslogtreecommitdiff
path: root/tests/test_build.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-01-03 20:26:38 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2016-01-03 20:26:38 +0900
commit7bb685bbe97824bc2c65bf8cb1d7ac38e5f91cd4 (patch)
treee0b3bce3be2c2a0e149387bc09aa87c9c0e8c28f /tests/test_build.py
parent2bcf92dfb0837f3be804662770fb4d45b767c284 (diff)
downloadsphinx-git-7bb685bbe97824bc2c65bf8cb1d7ac38e5f91cd4.tar.gz
Fix #2197: Slightly cryptic error message for missing index.rst file
Diffstat (limited to 'tests/test_build.py')
-rw-r--r--tests/test_build.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_build.py b/tests/test_build.py
index 5b9d7a756..aa5d72ce9 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -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()