test_c_spawn_defaults_still_present_and_unchanged

Tests › tests/test_python_ast.py

passed Passed in the packaged run.

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

  1. —
→

When

  1. by_name = {p.name: p for p in load_thread_patterns(None)}
  2. for name in ("pthread_create", "xTaskCreate", "osThreadNew", "std::thread", "std::jthread"): assert name in by_name, f"{name} lost from defaults"
→

Then

  1. ✓ by_name["pthread_create"].entry_arg_index equals 2
  2. ✓ by_name["xTaskCreate"].name_arg_index equals 1
  3. ✓ by_name["pthread_create"].entry_kwarg is None
  4. ✓ by_name["threading.Thread"].entry_kwarg equals "target"

tests/test_python_ast.py:258 · its file's page

What it checks (5)

  1. assert name in by_name, f"{name} lost from defaults" observes load_thread_patterns via by_name
  2. assert by_name["pthread_create"].entry_arg_index == 2 observes load_thread_patterns via by_name
  3. assert by_name["xTaskCreate"].name_arg_index == 1 observes load_thread_patterns via by_name
  4. assert by_name["pthread_create"].entry_kwarg is None observes load_thread_patterns via by_name
  5. assert by_name["threading.Thread"].entry_kwarg == "target" 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_c_spawn_defaults_still_present_and_unchanged→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_c_spawn_defaults_still_present_and_unchanged · 5 checksload_thread_patternsREQ-DDB-SCHEMA-001 · measuredload_thread_patternsdeclaration_originREQ-DDB-SCHEMA-012 · inferred
Also reaches 2 requirements

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