test_requirements_export_as_reqif

Tests › tests/test_wiki_exports.py

passed Passed in the packaged run.

What this test is for

Why it exists

ReqIF 1.2: one SPEC-OBJECT per requirement with its id, title and tier.

Verifies REQ-DDB-WIKI-029

Given

  1. root = ET.parse(_html(site) / "exports/requirements.reqif").getroot()
  2. objects = root.findall(f".//{_REQIF}SPEC-OBJECT")
  3. values = { v.get("THE-VALUE") for o in objects for v in o.findall(f".//{_REQIF}ATTRIBUTE-VALUE-STRING") }
→

When

  1. —
→

Then

  1. ✓ root.tag equals f"{_REQIF}REQ-IF"
  2. ✓ len(objects) equals 3
  3. ✓ {"REQ-W-001", "Load the data", "PASS"} is at most values
  4. ✓ root.findall(f".//{_REQIF}SPECIFICATION") holds

tests/test_wiki_exports.py:59 · its file's page

What it checks (3)

  1. assert root.tag == f"{_REQIF}REQ-IF" observes _html via root
  2. assert len(objects) == 3 and {"REQ-W-001", "Load the data", "PASS"} <= values not attributed
  3. assert root.findall(f".//{_REQIF}SPECIFICATION") observes _html via root

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_requirements_export_as_reqif→_html

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.

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-029catalogunknown