clew
  • Requirements
  • Flows
  • Tests
  • Change impact
  • Map
  • Architecture
  • Docs
  • SBOM

test_issues_link_to_requirements_three_ways_and_never_by_prefix¶

Tests › tests/test_wiki_issues.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE ID IN TITLE OR BODY, a `req:` label, a `clew-req:` marker line; `REQ-W-0011` does not link `REQ-W-001`.

Given

  1. issues = [ Issue("1", "REQ-W-001 is slow", "", (), "u1", "open"), Issue("2", "Crash", "", ("req:REQ-X-001",), "u2", "open"), Issue("3", "Other", "details\nclew-req: REQ-W-002\n", (), "u3", "open"), Issue("4", "REQ-W-0011 only", "", (), "u4", "open"), Issue("5", "Unrelated", "", (), "u5", "open"), ]
→

When

  1. linked, unlinked = link_issues(issues, ["REQ-W-001", "REQ-W-002", "REQ-X-001"])
→

Then

  1. ✓ [i.id for i in linked["REQ-W-001"]] equals ["1"]
  2. ✓ [i.id for i in linked["REQ-X-001"]] equals ["2"]
  3. ✓ [i.id for i in linked["REQ-W-002"]] equals ["3"]
  4. ✓ [i.id for i in unlinked] equals ["4", "5"]

tests/test_wiki_issues.py:128 · its file's page

What it checks (4)

  1. assert [i.id for i in linked["REQ-W-001"]] == ["1"] not attributed
  2. assert [i.id for i in linked["REQ-X-001"]] == ["2"] not attributed
  3. assert [i.id for i in linked["REQ-W-002"]] == ["3"] not attributed
  4. assert [i.id for i in unlinked] == ["4", "5"] not attributed

Where the product reaches it

  • build_wiki → _build_site → _fetch_issues → link_issues (flow)

Call flow

test_issues_link_to_requirements_three_ways_and_never_by_prefix→link_issues

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.

test_issues_link_to_requirements_three_ways_and_never_by_prefix · 4 checkslink_issuesREQ-DDB-WIKI-028 · measured
Also reaches 1 requirement

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

  • REQ-DDB-WIKI-028 measured
clew Generated by clew wiki from the repository's index