Source: sphinx-prompt
Version: 1.5.0-2
Severity: serious
Dear Maintainer,
after the upload of pygments 2.14.0+dfsg-1 your package is failung while
running the autopkgtest.
Some of the failing parts are:
autopkgtest [03:25:03]: test unittests: [-----------------------
============================= test session starts ==============================
platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0+repack
rootdir: /tmp/autopkgtest-lxc.k5oqcgm7/downtmp/build.h5g/src
collected 12 items
../build.h5g/src/tests/test_sphinx_prompt.py .FF.FFFF..F. [100%]
=================================== FAILURES ===================================
_ test[arguments1-options1-content1-<div class="highlight-default
notranslate"><div class="highlight"><pre><style
type="text/css">\nspan.prompt1:before {\n content: "$ ";\n}\n</style><span
class="prompt1">one line</span>\n</pre></div></div>] _
arguments = ['bash'], options = {'language': 'bash'}, content = ['one line']
expected = '<div class="highlight-default notranslate"><div
class="highlight"><pre><style type="text/css">\nspan.prompt1:before {\n
content: "$ ";\n}\n</style><span class="prompt1">one
line</span>\n</pre></div></div>'
@pytest.mark.parametrize("arguments, options, content, expected", testdata)
def test(arguments, options, content, expected):
sphinx_prompt._cache.next_index = 1
sphinx_prompt._cache.prompts.clear()
stream = StringIO()
reporter = docutils.utils.Reporter("test data", 2, 4, stream, 1)
statemachine = docutils.statemachine.StateMachine([], None)
setattr(statemachine, "reporter", reporter)
directive = sphinx_prompt.PromptDirective(
"prompt", arguments, options, content, 0, 0, "", None, statemachine
)
result = directive.run()
> assert result[0].astext() == expected
E assert '<div class="...></div></div>' == '<div class="...></div></div>'
E Skipping 159 identical leading characters in diff, use -v to show
E - ompt1">one line</span>
E + ompt1">one<span class="w"> </span>line</span>
E </pre></div></div>
../build.h5g/src/tests/test_sphinx_prompt.py:165: AssertionError
_ test[arguments2-options2-content2-<div class="highlight-default
notranslate"><div class="highlight"><pre><style
type="text/css">\nspan.prompt1:before {\n content: "$ ";\n}\n</style><span
class="prompt1">one line</span>\n</pre></div></div>] _
arguments = [], options = {'language': 'bash'}, content = ['one line']
expected = '<div class="highlight-default notranslate"><div
class="highlight"><pre><style type="text/css">\nspan.prompt1:before {\n
content: "$ ";\n}\n</style><span class="prompt1">one
line</span>\n</pre></div></div>'
@pytest.mark.parametrize("arguments, options, content, expected", testdata)
def test(arguments, options, content, expected):
sphinx_prompt._cache.next_index = 1
sphinx_prompt._cache.prompts.clear()
stream = StringIO()
reporter = docutils.utils.Reporter("test data", 2, 4, stream, 1)
statemachine = docutils.statemachine.StateMachine([], None)
setattr(statemachine, "reporter", reporter)
directive = sphinx_prompt.PromptDirective(
"prompt", arguments, options, content, 0, 0, "", None, statemachine
)
result = directive.run()
> assert result[0].astext() == expected
E assert '<div class="...></div></div>' == '<div class="...></div></div>'
E Skipping 159 identical leading characters in diff, use -v to show
E - ompt1">one line</span>
E + ompt1">one<span class="w"> </span>line</span>
E </pre></div></div>
...
It might be enough to pick
https://github.com/sbrunner/sphinx-prompt/commit/f996f7ab96ec63b08e27f96559b759143ccff214
from the upstream git tree to fix the issues.
Regards
Carsten
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 6.0.0-6-amd64 (SMP w/20 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled