Skip to content

Fix test_gettext_literalblock_additional to use the correct test root - #14507

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

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.

I agree that 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
@frenzymadness

Copy link
Copy Markdown

The same fix is in this commit: 6d3331e

This PR can be closed.

@jdillard

Copy link
Copy Markdown
Member

Thanks for pointing that out! Closing as already implemented.

@jdillard jdillard closed this Oct 29, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

3 participants