diff options
Diffstat (limited to 'tests/test_setup_command.py')
| -rw-r--r-- | tests/test_setup_command.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test_setup_command.py b/tests/test_setup_command.py index 77c9ade46..c92f6220f 100644 --- a/tests/test_setup_command.py +++ b/tests/test_setup_command.py @@ -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' |
