You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_gettext_literalblock_additional: Assertion that literalblock.pot exists fails in the parallel test run in Fedora Linux #14506
When running the test suite in parallel rather than sequentially during the build for Fedora Linux 45 (using pytest-xdist plugin), there's one test failure - that curiously doesn't happen when I run the same branch with tox on the upstream copy of the repository.
The failure however looks genuine. Assertion that file literalblock.pot exists fails. The testroot used for this test is root which doesn't contain literalblock.txt that would be built to the desired file. It looks like some other test produces the file and this test uses a "leftover" from the srcdir. A root containing the source file for this test would be intl instead.
I've verified this change of roots resolves the issue for me. Although I couldn't reproduce the issue on the upstream repository, I checked the fix doesn't break anything.
The traceback:
_____________________ test_gettext_literalblock_additional _____________________
[gw1] linux -- Python 3.15.0 /usr/bin/python3
app = <SphinxTestApp buildername='gettext'>
@pytest.mark.sphinx(
'gettext',
testroot='root',
srcdir='gettext',
confoverrides={
'gettext_compact': False,
'gettext_additional_targets': ['literal-block', 'doctest-block'],
},
)
def test_gettext_literalblock_additional(app: SphinxTestApp) -> None:
app.build(force_all=True)
> assert (app.outdir / 'literalblock.pot').is_file()
E AssertionError: assert False
E + where False = is_file()
E + where is_file = (_StrPath('/tmp/pytest-of-mockbuild/pytest-2/popen-gw1/gettext/_build/gettext') / 'literalblock.pot').is_file
E + where _StrPath('/tmp/pytest-of-mockbuild/pytest-2/popen-gw1/gettext/_build/gettext') = <SphinxTestApp buildername='gettext'>.outdir
tests/test_builders/test_build_gettext.py:301: AssertionError
How to Reproduce
I was unable to reproduce outside of the Fedora rpm environment, although happy to provide more information if desired.
The report is specific enough that it could probably be turned into a small failing test for “test_gettext_literalblock_additional: Assertion that literalblock.pot exists fails in the parallel test run in”. I would try to assert the exact behavior around literalblock.pot rather than only checking that the command or UI path no longer errors, so the test guards the intended fix.
This is fixed: the test now uses testroot='intl', which contains literalblock.txt, instead of testroot='root', so it no longer depends on a leftover literalblock.pot from another test.
The change landed directly in 6d3331e and is available since Sphinx 9.1.1. Please upgrade to the latest release, Sphinx 9.2.0, and the parallel test run should pass.
Activity
hiSandog commentedon Jul 5, 2026
The report is specific enough that it could probably be turned into a small failing test for “test_gettext_literalblock_additional: Assertion that literalblock.pot exists fails in the parallel test run in”. I would try to assert the exact behavior around
literalblock.potrather than only checking that the command or UI path no longer errors, so the test guards the intended fix.jdillard commentedon Nov 20, 2026
This is fixed: the test now uses
testroot='intl', which containsliteralblock.txt, instead oftestroot='root', so it no longer depends on a leftoverliteralblock.potfrom another test.The change landed directly in 6d3331e and is available since Sphinx 9.1.1. Please upgrade to the latest release, Sphinx 9.2.0, and the parallel test run should pass.