summaryrefslogtreecommitdiff
path: root/tests/test_setup_command.py
diff options
context:
space:
mode:
authorTakayuki Shimizukawa <shimizukawa@gmail.com>2014-08-29 01:14:54 +0900
committerTakayuki Shimizukawa <shimizukawa@gmail.com>2014-08-29 01:14:54 +0900
commitad69dadd1446205152f7383e47fc6877e0f48e4d (patch)
treeb0a115eb37cf0918a140da7199940623861e8bb2 /tests/test_setup_command.py
parente9aae6563d645f56819e412481b40d21c3a7ba70 (diff)
downloadsphinx-git-ad69dadd1446205152f7383e47fc6877e0f48e4d.tar.gz
Now Sphinx exits with non-zero status code if builder status is not success. Closes #508.
Diffstat (limited to 'tests/test_setup_command.py')
-rw-r--r--tests/test_setup_command.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_setup_command.py b/tests/test_setup_command.py
index ef7fd1f3c..c165b2d33 100644
--- a/tests/test_setup_command.py
+++ b/tests/test_setup_command.py
@@ -47,7 +47,7 @@ def with_setup_command(root, *args, **kwds):
env=dict(os.environ, PYTHONPATH=pythonpath),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- func(pkgrootdir, proc, *args, **kwds)
+ func(pkgrootdir, proc)
finally:
tempdir.rmtree(ignore_errors=True)
os.chdir(cwd)
@@ -92,3 +92,14 @@ def test_build_sphinx_with_nonascii_path(pkgroot, proc):
print(out)
print(err)
assert proc.returncode == 0
+
+
+@with_setup_command(root, '-b', 'linkcheck')
+def test_build_sphinx_return_nonzero_status(pkgroot, proc):
+ srcdir = (pkgroot / 'doc')
+ (srcdir / 'contents.txt').write_text(
+ 'http://localhost.unexistentdomain/index.html')
+ out, err = proc.communicate()
+ print(out)
+ print(err)
+ assert proc.returncode != 0, 'expect non-zero status for setup.py'