test_c_spawn_defaults_still_present_and_unchanged¶
Tests › tests/test_python_ast.py
What this test is for
Why it exists
Adding the Python primitives must not displace the C/C++ ones, and the merged map must keep each C pattern's argument positions.
Given
- —
When
by_name = {p.name: p for p in load_thread_patterns(None)}for name in ("pthread_create", "xTaskCreate", "osThreadNew", "std::thread", "std::jthread"): assert name in by_name, f"{name} lost from defaults"
Then
- ✓ by_name["pthread_create"].entry_arg_index equals 2
- ✓ by_name["xTaskCreate"].name_arg_index equals 1
- ✓ by_name["pthread_create"].entry_kwarg is None
- ✓ by_name["threading.Thread"].entry_kwarg equals "target"
tests/test_python_ast.py:258 · its file's page
What it checks (5)
assert name in by_name, f"{name} lost from defaults"observesload_thread_patternsviaby_nameassert by_name["pthread_create"].entry_arg_index == 2observesload_thread_patternsviaby_nameassert by_name["xTaskCreate"].name_arg_index == 1observesload_thread_patternsviaby_nameassert by_name["pthread_create"].entry_kwarg is Noneobservesload_thread_patternsviaby_nameassert by_name["threading.Thread"].entry_kwarg == "target"observesload_thread_patternsviaby_name
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
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.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-012 inferred