Source: sphinxcontrib-programoutput Version: 0.8-5 Severity: important Tags: patch User: [email protected] Usertags: sphinx1.6
Dear Maintainer,
sphinxcontrib-programoutput fails to build with Sphinx 1.6, currently
available in experimental:
=================================== FAILURES
===================================
_________________________ test_unexpected_return_code
__________________________
app = <sphinx.application.Sphinx object at 0x7fae4aeeeb90>
@pytest.mark.with_content("""\
.. program-output:: python -c 'import sys; sys.exit(1)'""")
def test_unexpected_return_code(app):
with pytest.raises(SphinxWarning) as excinfo:
app.build()
exc_message = 'WARNING: Unexpected return code 1 from command
{0!r}\n'.format(
"python -c 'import sys; sys.exit(1)'")
> assert str(excinfo.value) == exc_message
E assert 'Unexpected r...ys.exit(1)\'"' == 'WARNING:
Unex...s.exit(1)\'"\n'
E - Unexpected return code 1 from command u"python -c \'import sys;
sys.exit(1)\'"
E ? -
-
E + WARNING: Unexpected return code 1 from command u"python -c
'import sys; sys.exit(1)'"
E ? +++++++++
+
tests/test_directive.py:247: AssertionError
A patch to fix this issue is attached.
--
Dmitry Shachnev
Description: fix tests failures with Sphinx 1.6 Author: Dmitry Shachnev <[email protected]> Forwarded: no Last-Update: 2017-08-07 --- a/tests/test_directive.py +++ b/tests/test_directive.py @@ -242,9 +242,9 @@ def test_unexpected_return_code(app): with pytest.raises(SphinxWarning) as excinfo: app.build() - exc_message = 'WARNING: Unexpected return code 1 from command {0!r}\n'.format( + exc_message = 'Unexpected return code 1 from command {0!r}'.format( "python -c 'import sys; sys.exit(1)'") - assert str(excinfo.value) == exc_message + assert exc_message in str(excinfo.value) @pytest.mark.with_content("""\ @@ -253,9 +253,9 @@ def test_shell_with_unexpected_return_code(app): with pytest.raises(SphinxWarning) as excinfo: app.build() - exc_message = 'WARNING: Unexpected return code 1 from command {0!r}\n'.format( + exc_message = 'Unexpected return code 1 from command {0!r}'.format( "python -c 'import sys; sys.exit(1)'") - assert str(excinfo.value) == exc_message + assert exc_message in str(excinfo.value) @pytest.mark.with_content("""\
signature.asc
Description: PGP signature

