Skip to content

Fix test_gettext_literalblock_additional to use the correct test root - #14507

Open
befeleme wants to merge 2 commits into
sphinx-doc:masterfrom
befeleme:literalblock
Open

Fix test_gettext_literalblock_additional to use the correct test root#14507
befeleme wants to merge 2 commits into
sphinx-doc:masterfrom
befeleme:literalblock

Conversation

@befeleme

Copy link
Copy Markdown
Contributor

Purpose

test-root doesn't contain the source file for literalblock.pot. The test passed sequentially because other tests using test root 'intl' left the file in the same srcdir. With pytest-xdist, the test started correctly failing, as no leftover file was available during the test run. Using the test root 'intl', which contains literalblock.txt, fixes the test.

References

Fixes #14506

AI Disclosure

I used claude code to debug why the test passes sequentially but not in parallel run. I have verified that the finding: incorrect test root, is indeed the issue happening and that the fix indeed fixes the issue observed in Fedora.

test-root doesn't contain the source file for literalblock.pot. The test
passed sequentially because other tests using test root 'intl' left the
file in the same srcdir. With pytest-xdist, the test started correctly failing,
as no leftover file was available during the test run.
Using the test root 'intl', which contains literalblock.txt, fixes the
test.

@jdillard jdillard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reusing srcdir='gettext' lets earlier tests contaminate that directory, explaining why sequential runs passed. This fix makes the test self-contained.

@jdillard jdillard added this to the 9.1.1 milestone Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_gettext_literalblock_additional: Assertion that literalblock.pot exists fails in the parallel test run in Fedora Linux

2 participants