test_python_module_docstring_is_the_file_documentation

Tests › tests/test_filedocs.py

passed Passed in the packaged run.

What this test is for

Why it exists

Uses the AST rather than a regex, so the SPDX comment above the docstring and the `from __future__` import below it are both non-events.

Verifies REQ-DDB-SCHEMA-014

Given

  1. —
→

When

  1. doc = extract_file_doc("clew/callback_edges.py", PY_SOURCE)
→

Then

  1. ✓ doc contains "function-pointer calls"
  2. ✓ doc contains "callback assignment"
  3. ✓ doc does not contain "SPDX"
  4. ✓ doc does not contain "Do it."
  5. ✓ doc does not contain "\n"

tests/test_filedocs.py:72 · its file's page

What it checks (5)

  1. assert "function-pointer calls" in doc observes extract_file_doc via doc
  2. assert "callback assignment" in doc observes extract_file_doc via doc
  3. assert "SPDX" not in doc, "a `#` comment is not the module docstring" observes extract_file_doc via doc
  4. assert "Do it." not in doc, "a FUNCTION docstring is not the file's documentation" observes extract_file_doc via doc
  5. assert "\n" not in doc observes extract_file_doc via doc

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_python_module_docstring_is_the_file_documentation→extract_file_doc

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_python_module_docstring_is_the_file_documentation · 5 checksextract_file_docREQ-DDB-PIPE-008 · measured

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-SCHEMA-014catalogunknown
Also reaches 1 requirement

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