test_a_github_style_heading_anchor_resolves

Tests › tests/test_wiki_prose_copy.py

passed Passed in the packaged run.

What this test is for

Why it exists

P6: OVERVIEW's `[Programmatic use](#programmatic-use)` and `GUARD.md#files-the-gate-skips` work on GitHub but MyST reported "target not found" / "local id not found" (and 7 more on sassafras-class): MyST makes heading anchors only when told to. A real render, judged by the warning MyST emits and by the cross-document link landing on the section.

Given

  1. source, html = tmp_path / "src", tmp_path / "out" / "html"
  2. source.mkdir()
4 more
  1. (source / "index.md").write_text( "# Top\n\n```{toctree}\nguard\n```\n\nSee [use](#programmatic-use) and " "[skips](guard.md#files-the-gate-skips).\n\n## Programmatic use\n\nText.\n", encoding="utf-8", )
  2. (source / "guard.md").write_text( "# Guard\n\n## Files the gate skips\n\nText.\n", encoding="utf-8" )
  3. _render(source, html, WikiConfig(), tmp_path)
  4. err = capfd.readouterr().err
→

When

  1. —
→

Then

  1. ✓ err does not contain "xref_missing"
  2. ✓ (html / "index.html").read_text( encoding="utf-8" ) contains 'href="guard.html#files-the-gate-skips"'

tests/test_wiki_prose_copy.py:49 · its file's page

What it checks (2)

  1. assert "xref_missing" not in err, err not attributed
  2. assert 'href="guard.html#files-the-gate-skips"' in (html / "index.html").read_text( encoding="utf-8" ) not attributed

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

Also reaches 3 requirements

Its run touches their code; that is reach, not proof.