tests.test_todolist module

Guard every :todo: admonition against never reaching the published page.

sphinx.ext.todo collects the admonitions onto docs/todolist.md, which is the project’s inventory of what it owes. An item written where autodoc never looks is absent from that inventory: the work stays undone and unlisted, and the page reads as complete while under-reporting.

autodoc skips a name starting with an underscore, so a :todo: on a private constant, function or class publishes nowhere. Two of them sat on the private regexes behind the mdformat post-process shim in repomatic.tooling.tool_registry, and the page carried 14 items while the tree held 16.

Nothing reports it. A :todo: renders exactly the same way whether or not its owner is picked up, the build stays warning-free, and the only way to notice is to count the page against the tree by hand. That silence is what earns this a conformance test rather than a line in claude.md.

The check reads the owner from the syntax tree instead of importing anything, so it runs everywhere the suite does. tests/test_docstrings.py covers the same population for a different corruption, but drives the real MyST converter and therefore skips wherever Sphinx is absent.

tests.test_todolist.TODO_MARKER = '```{todo}'

Opening fence of a todo admonition, as written throughout the package.

tests.test_todolist.CONF_PY = PosixPath('/home/runner/work/repomatic/repomatic/docs/conf.py')

Sphinx configuration, read for the autodoc options this check assumes.

tests.test_todolist.test_package_discovered()[source]

The scan actually walks the package, so a green result means something.

Return type:

None

tests.test_todolist.test_the_package_owes_something()[source]

The tree carries todo admonitions at all, so the sweep has a subject.

An empty population would pass every assertion below while proving nothing.

Return type:

None

tests.test_todolist.test_autodoc_skips_private_members()[source]

Pin the premise the sweep below rests on.

Turning private-members on would publish a private owner’s docstring and make the sweep over-strict. It is off today, and this fails the moment that changes, rather than leaving the sibling test quietly wrong.

Return type:

None

tests.test_todolist.test_detector_flags_hidden_todo()[source]

The detector catches each hidden owner, and clears the published ones.

Return type:

None

tests.test_todolist.test_every_todo_is_published(source_file)[source]

Every todo admonition sits where autodoc renders it onto the page.

Return type:

None