summaryrefslogtreecommitdiff
path: root/tests/test_config.py
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2014-06-30 22:54:28 +0900
committershimizukawa <shimizukawa@gmail.com>2014-06-30 22:54:28 +0900
commit0778537971d915171460dfbf9bf8fcdba51fb474 (patch)
tree8f0c2dcdecde5267ce5e606c963478074c899b27 /tests/test_config.py
parent6f8d7560eec0baf63b7885505c39dd9fae924edd (diff)
downloadsphinx-0778537971d915171460dfbf9bf8fcdba51fb474.tar.gz
* With non-callable `setup` in a conf.py, now sphinx-build emits user-friendly error message. Closes #1499
Diffstat (limited to 'tests/test_config.py')
-rw-r--r--tests/test_config.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 976b962f..1e00091d 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -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'})