tests.test_docs module¶
Checks on the docs pages that list the test suite, and on the readme assets.
- tests.test_docs.TESTS_DIR = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/tests')¶
Directory of the test suite.
- tests.test_docs.PROJECT_ROOT = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate')¶
Repository root.
- tests.test_docs.DOCS_DIR = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/docs')¶
Directory of the documentation sources.
- tests.test_docs.TESTS_PAGE = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/docs/tests.md')¶
API page of the
testspackage, beside onetests.{module}.mdpage per module.
- tests.test_docs.ASSETS_DIR = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/docs/assets')¶
Directory holding the pictures the readme and the docs embed.
- tests.test_docs.CAPTURE_SCRIPT = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/docs/cli_screenshots_update.py')¶
Script drawing the CLI captures the readme and the docs embed.
- tests.test_docs.CLI_PAGE = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/docs/cli.md')¶
Documentation page with the help screen of every command.
- tests.test_docs.DESIGN_PAGE = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/docs/design.md')¶
Documentation page with the table of the presets.
- tests.test_docs.FORMATS_PAGE = PosixPath('/home/runner/work/mail-deduplicate/mail-deduplicate/docs/formats.md')¶
Documentation page with the table of the box formats.
- tests.test_docs.NO_DOCS = 'The documentation sources are not part of this tree.'¶
Why a test reading
docs/skips in the sdist, which ships the tests alone.
- tests.test_docs.test_design_page_spells_out_each_preset(preset)[source]¶
docs/design.mdlists the options each preset stands for.The table of the page is written by hand, so a preset changing its options has to change the table too.
- tests.test_docs.test_every_test_module_has_a_page()[source]¶
Each module of the test suite has one API page under
docs/, and no other.repomatic update-docswrites the page of a new module, but never deletes the page of a module that is gone: that page then fails the build on a module autodoc cannot import.
- tests.test_docs.test_formats_page_lists_each_box_format(box_format)[source]¶
docs/formats.mdopens a table row with each box format.The table of the page is written by hand, so a new format has to add its row. Only a row that opens with the format counts: the table of what a copy keeps names formats in its other columns.
- tests.test_docs.test_cli_page_renders_the_command_tree()[source]¶
docs/cli.mdrenders the help of every command from one{click:tree}block.The block covers each option by construction, so only its removal can leave an option out of the published reference.
- tests.test_docs.test_every_cli_capture_is_embedded()[source]¶
Each capture
docs/cli_screenshots_update.pywrites is embedded in a page.That page is the readme or a docs page, and no SVG in
docs/assets/outlives the capture that produced it.The stems of the captures are the file names the pages link, so renaming one in the script breaks a page silently: GitHub serves a 404 where the readme’s picture was, and nothing in a docs build reads that URL. The reverse direction rots the same way: a capture dropped from the script leaves its SVG in the tree, unreferenced and never refreshed again.
- tests.test_docs.test_pages_show_the_command_their_picture_runs()[source]¶
A page embedding a capture shows the command line the capture ran.
The picture and the command sit side by side, and a reader compares them: an option changed in one and not the other reads as the picture disagreeing with the instructions. Nothing compares the two, since the command is prose to every other check here.
A capture forcing an error is the exception: its command reproduces nothing on a reader’s boxes, so its page explains the picture instead.
- tests.test_docs.test_cli_capture_prompts_fit_their_window()[source]¶
Every captured command line fits its window on one row.
docs/cli_screenshots_update.pyrejects an over-long invocation before it draws one, but the guard only runs when someone recaptures by hand. This runs the same guard over the committed captures instead, so an option added to a capture and not to its picture cannot land unnoticed.A wrapped prompt reads as two commands, and the second one opens mid-option: the picture would teach an invocation nobody can type.
- tests.test_docs.test_captures_run_outside_any_agent(monkeypatch)[source]¶
The captures run without any variable that makes
mdedupdetect an agent.The bug report asks a detected agent to show it to its user, a line no person running
mdedupsees. Each agentextra-platformsdetects reads a variable of its own, so a new release can name one the capture script does not drop.
- tests.test_docs.test_self_referencing_urls_name_a_file_the_tree_holds()[source]¶
A
raw.githubusercontent.comURL to this repository names a file it carries.This covers the URLs that point at the
mainbranch.Nothing else resolves these: they are fetched by a reader far from any test, on GitHub and on PyPI, where the readme is the whole page. Renaming a file under
docs/assets/therefore breaks every surface at once, with no build and no link check in between.A URL pinned to a tag names a historical tree and is skipped, the working copy being no evidence about what that tag held.