test_a_declaration_still_overrides_a_windows_default

Tests › tests/test_thread_spawns.py

passed Passed in the packaged run.

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

  1. manifest = tmp_path / "spawns.yaml"
  2. manifest.write_text( "spawns:\n - name: CreateThread\n entry_arg_index: 0\n kind: task\n", encoding="utf-8", )
→

When

  1. by_name = {p.name: p for p in load_thread_patterns(manifest)}
→

Then

  1. ✓ by_name["CreateThread"].entry_arg_index equals 0
  2. ✓ by_name["CreateThread"].kind equals "task"
  3. ✓ by_name["_beginthread"].entry_arg_index equals 0
  4. ✓ by_name["pthread_create"].entry_arg_index equals 2

tests/test_thread_spawns.py:159 · its file's page

What it checks (4)

  1. assert by_name["CreateThread"].entry_arg_index == 0, "the declaration must win" observes load_thread_patterns via by_name
  2. assert by_name["CreateThread"].kind == "task" observes load_thread_patterns via by_name
  3. assert by_name["_beginthread"].entry_arg_index == 0 observes load_thread_patterns via by_name
  4. assert by_name["pthread_create"].entry_arg_index == 2 observes load_thread_patterns via by_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

test_a_declaration_still_overrides_a_windows_default→load_thread_patterns

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_a_declaration_still_overrides_a_windows_default · 4 checksload_thread_patternsREQ-DDB-SCHEMA-001 · measuredload_thread_patternsdeclaration_originREQ-DDB-SCHEMA-012 · measured
Also reaches 2 requirements

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