Skip to content

Avoid captionless figures in intl test fixture - #14511

Closed
ghost wants to merge 2 commits into
masterfrom
unknown repository
Closed

ghost wants to merge 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • add comment-only legends to the captionless figures in the intl fixture
  • keep the text builder output unchanged while satisfying Docutils HEAD figure validation

Testing

  • python -m pytest tests/test_intl/test_intl.py::test_text_figure_captions -q with Docutils HEAD (docutils-1.0b1.dev0) failed before the change with Figure without caption and legend system messages in figure.txt
  • python -m pytest tests/test_intl/test_intl.py::test_text_figure_captions -q with Docutils HEAD passed after the change
  • python -m pytest tests/test_intl/test_intl.py::test_text_figure_captions -q with supported Docutils 0.22.4 passed

Closes #14508

@jdillard

jdillard commented Jul 2, 2026

Copy link
Copy Markdown
Member

@jdillard

jdillard commented Jul 7, 2026

Copy link
Copy Markdown
Member

Closing since there was no reply.

@jdillard jdillard closed this Jul 7, 2026
gmilde added a commit to gmilde/sphinx that referenced this pull request Jul 21, 2026
Docutils commit r10373 changed the formatting of the HTML source to improve
readability (no change to normalized HTML or the rendering in a browser).

The added insignificant newline leads to a "false-negative" in a
Sphinx ebuild writer test. Using a regexp search instead of a fixed
substring search allows to test for the correct output while ignoring
insignificant whitespace.

The fix is a "hand-revised" version of the second commit in PR sphinx-doc#14511
by ishaanlabs-gg (which was closed because of a missing AI disclosure).

No AI was used by me in preparing this patch.
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 5, 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.

Invalid rST input in tests/test_intl/test_intl.py::test_text_figure_captions.

1 participant