test_thread_spawn_aliased_import_form¶
Tests › tests/test_rust_ast.py
What this test is for
Why it exists
The test says nothing about why.
Given
tree, src = _parse( "use std::thread;\nfn worker() {}\nfn main() {\n thread::spawn(|| { worker(); });\n}\n" )
When
patterns = patterns_by_name(load_thread_patterns(None))sites = _walk_spawn_sites(tree, src, patterns)
Then
- ✓ len(sites) equals 1
- ✓ sites[0][1] equals "worker"
tests/test_rust_ast.py:90 · its file's page
What it checks (2)
assert len(sites) == 1observes_walk_spawn_sitesviasitesassert sites[0][1] == "worker"observes_walk_spawn_sitesviasites
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_thread_spawn_aliased_import_form→_parse→patterns_by_name→load_thread_patterns→_walk_spawn_sitesWhat 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.
Also reaches 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-012 inferred