Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

👌 sphinx-test-reports: build a test case's content as docutils nodes instead of re-parsed reStructuredText

Open
#2,185 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Read the test-case content construction and compare it with how the test-results and test-env cells build docutils nodes through sphinx-needs' content API. The issue offers two directions: build the report content from nodes, or keep the reStructuredText route and add per-character tests. Check the existing tests and the API entry point first; done means the chosen approach keeps failure messages, text, and captured output safely inside the intended content.

Written by the indexing model from the issue text.

Description

enhancement P4 pkg: sphinx-test-reports

test-case writes a case's failure message, text and captured output into the need's CONTENT as reStructuredText source — **Text**:: + an indented literal block — which sphinx-needs then parses. #2179 made that construction keep every line inside the block whatever line-break characters the text holds. The remaining fragility is the construction itself: report text travels as RST source and is re-parsed, so every future rule of the parser (new line boundaries, a changed indentation rule) is a new way for it to leave the block.

Enhancement: build the content as docutils NODES (nodes.literal_block(text, text) under a nodes.paragraph title) through sphinx-needs' content API instead of RST text — the test-results and test-env cells already use node text and were safe by construction in #2179's site table — or keep the text route and pin it with the existing per-character tests. Noted as out of scope in #2179's brief (R3).

Dominant language
Python
Stars
309
Forks
103
Avg merge
11h 26m
Merged PRs (30d)
118

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from useblocks/sphinx-needs

All issues in useblocks/sphinx-needs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.