mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add `--warning-is-error
` option to setup.py command
This commit is contained in:
@@ -108,3 +108,25 @@ def test_build_sphinx_return_nonzero_status(pkgroot, proc):
|
||||
print(out)
|
||||
print(err)
|
||||
assert proc.returncode != 0, 'expect non-zero status for setup.py'
|
||||
|
||||
|
||||
@with_setup_command(root)
|
||||
def test_build_sphinx_warning_return_zero_status(pkgroot, proc):
|
||||
srcdir = (pkgroot / 'doc')
|
||||
(srcdir / 'contents.txt').write_text(
|
||||
'See :ref:`unexisting-reference-label`')
|
||||
out, err = proc.communicate()
|
||||
print(out)
|
||||
print(err)
|
||||
assert proc.returncode == 0
|
||||
|
||||
|
||||
@with_setup_command(root, '--warning-is-error')
|
||||
def test_build_sphinx_warning_is_error_return_nonzero_status(pkgroot, proc):
|
||||
srcdir = (pkgroot / 'doc')
|
||||
(srcdir / 'contents.txt').write_text(
|
||||
'See :ref:`unexisting-reference-label`')
|
||||
out, err = proc.communicate()
|
||||
print(out)
|
||||
print(err)
|
||||
assert proc.returncode != 0, 'expect non-zero status for setup.py'
|
||||
|
Reference in New Issue
Block a user