* With non-callable setup in a conf.py, now sphinx-build emits user-friendly error message. Closes #1499

This commit is contained in:
Takayuki Shimizukawa
2014-06-30 22:54:28 +09:00
parent ff8ce91f77
commit f781f55b28
3 changed files with 19 additions and 2 deletions

View File

@@ -110,6 +110,13 @@ def test_errors_warnings(dir):
assert warned[0]
@with_tempdir
def test_errors_if_setup_is_not_callable(dir):
# test the error to call setup() in the config file
(dir / 'conf.py').write_text(u'setup = 1')
raises_msg(ConfigError, 'callable', TestApp, srcdir=dir)
def test_needs_sphinx():
raises(VersionRequirementError, TestApp,
confoverrides={'needs_sphinx': '9.9'})