test_ast_caller_at_line_finds_match_in_window

Tests › tests/test_build_docs_db.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010

Given

  1. funcs = [ (10, "foo", 1, 5), (20, "bar", 6, 12), (30, "baz", 13, 99), ]
→

When

  1. _ast_caller_at_line(funcs, 3)
  2. _ast_caller_at_line(funcs, 7)
  3. _ast_caller_at_line(funcs, 99)
  4. _ast_caller_at_line(funcs, 100)
→

Then

  1. ✓ _ast_caller_at_line(funcs, 3) equals 10
  2. ✓ _ast_caller_at_line(funcs, 7) equals 20
  3. ✓ _ast_caller_at_line(funcs, 99) equals 30
  4. ✓ _ast_caller_at_line(funcs, 100) is None

tests/test_build_docs_db.py:441 · its file's page

What it checks (4)

  1. assert _ast_caller_at_line(funcs, 3) == 10 observes _ast_caller_at_line
  2. assert _ast_caller_at_line(funcs, 7) == 20 observes _ast_caller_at_line
  3. assert _ast_caller_at_line(funcs, 99) == 30 observes _ast_caller_at_line
  4. assert _ast_caller_at_line(funcs, 100) is None observes _ast_caller_at_line

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_ast_caller_at_line_finds_match_in_window→_ast_caller_at_line

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 (2)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-001catalogunknown
REQ-DDB-PIPE-010catalogunknown