test_thread_spawn_aliased_import_form

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( "use std::thread;\nfn worker() {}\nfn main() {\n thread::spawn(|| { worker(); });\n}\n" )
→

When

  1. patterns = patterns_by_name(load_thread_patterns(None))
  2. sites = _walk_spawn_sites(tree, src, patterns)
→

Then

  1. ✓ len(sites) equals 1
  2. ✓ sites[0][1] equals "worker"

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

What it checks (2)

  1. assert len(sites) == 1 observes _walk_spawn_sites via sites
  2. assert sites[0][1] == "worker" observes _walk_spawn_sites via sites

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_sites

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_thread_spawn_aliased_import_form · 2 checks_walk_spawn_sitesis_python_treeREQ-DDB-PIPE-003 · measuredload_thread_patternsREQ-DDB-SCHEMA-001 · measuredload_thread_patternsdeclaration_originREQ-DDB-SCHEMA-012 · inferred
Also reaches 3 requirements

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