test_a_declaration_still_overrides_a_windows_default¶
Tests › tests/test_thread_spawns.py
What this test is for
Why it exists
Defaults must stay overridable. A project that wraps `CreateThread` behind its own signature has to be able to say so, and `load_thread_patterns` merges a declared entry OVER a default of the same name.
Given
manifest = tmp_path / "spawns.yaml"manifest.write_text( "spawns:\n - name: CreateThread\n entry_arg_index: 0\n kind: task\n", encoding="utf-8", )
When
by_name = {p.name: p for p in load_thread_patterns(manifest)}
Then
- ✓ by_name["CreateThread"].entry_arg_index equals 0
- ✓ by_name["CreateThread"].kind equals "task"
- ✓ by_name["_beginthread"].entry_arg_index equals 0
- ✓ by_name["pthread_create"].entry_arg_index equals 2
tests/test_thread_spawns.py:159 · its file's page
What it checks (4)
assert by_name["CreateThread"].entry_arg_index == 0, "the declaration must win"observesload_thread_patternsviaby_nameassert by_name["CreateThread"].kind == "task"observesload_thread_patternsviaby_nameassert by_name["_beginthread"].entry_arg_index == 0observesload_thread_patternsviaby_nameassert by_name["pthread_create"].entry_arg_index == 2observesload_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 measured