test_a_function_block_is_read_with_its_parameters_and_sections

Tests › tests/test_kerneldoc.py

passed Passed in the packaged run.

What this test is for

Why it exists

Name, brief,

Given

  1. —
→

When

  1. (fn, *_rest) = parse_kerneldoc(_SOURCE)
→

Then

  1. ✓ (fn["kind"], fn["name"], fn["brief"]) equals ("function", "dev_open", "Open the device.")
  2. ✓ json.loads(fn["params"]) equals { "dev": "The device, already probed.", "flags": "O_* flags; O_NONBLOCK returns at once.", }
  3. ✓ fn["context"] equals "Process context. Sleeps."
  4. ✓ fn["returns"] equals "0 on success, a negative errno otherwise."
  5. ✓ fn["description"] contains "Takes the device lock"
  6. ✓ fn["line"] equals 1

tests/test_kerneldoc.py:50 · its file's page

What it checks (6)

  1. assert (fn["kind"], fn["name"], fn["brief"]) == ("function", "dev_open", "Open the device.") not attributed
  2. assert json.loads(fn["params"]) == { "dev": "The device, already probed.", "flags": "O_* flags; O_NONBLOCK returns at once.", } not attributed
  3. assert fn["context"] == "Process context. Sleeps." not attributed
  4. assert fn["returns"] == "0 on success, a negative errno otherwise." not attributed
  5. assert "Takes the device lock" in fn["description"] not attributed
  6. assert fn["line"] == 1 not attributed

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_a_function_block_is_read_with_its_parameters_and_sections→parse_kerneldoc

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_a_function_block_is_read_with_its_parameters_and_sections · 6 checksparse_kerneldocREQ-DDB-INDEX-009 · measured
Also reaches 1 requirement

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