test_call_edges_resolves_direct_and_qualified_calls

Tests › tests/test_rust_ast.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Given

  1. tree, src = _parse( "fn helper(x: i32) -> i32 { x + 1 }\n" "fn main() {\n" " helper(1);\n" " std::thread::spawn(|| {});\n" "}\n" )
→

When

  1. sites = _ast_harvest_calls(tree, src)
  2. names = {s[0] for s in sites}
  3. spawn_site = next(s for s in sites if s[0] == "spawn")
→

Then

  1. ✓ names contains "helper"
  2. ✓ names contains "spawn"
  3. ✓ spawn_site[3] equals "std::thread::spawn"

tests/test_rust_ast.py:41 · its file's page

What it checks (3)

  1. assert "helper" in names not attributed
  2. assert "spawn" in names not attributed
  3. assert spawn_site[3] == "std::thread::spawn" 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_call_edges_resolves_direct_and_qualified_calls→_parse→_ast_harvest_calls

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_call_edges_resolves_direct_and_qualified_calls · 3 checks_ast_harvest_callsis_python_treeREQ-DDB-PIPE-003 · measured
Also reaches 1 requirement

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