test_the_scope_fallback_names_where_it_looked

Tests › tests/test_guard_config_index.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Given

  1. —
→

When

  1. reason = derive_scope(tmp_path).reason
  2. _write(tmp_path, _GUARD)
  3. reason = derive_scope(tmp_path).reason
→

Then

  1. ✓ reason contains f"no {CONFIG_FILE_NAME} was found"
  2. ✓ reason contains "exists but carries no index_scope"

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

clew — `main` (clew/cli.py) · 30 of 400 steps

… 10 earlier steps

command-line usercommand-line usercommand-line usercommand-line userclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filesalt (line 1171)altopt (line 529)optmain11. propose → build_context11build_context12. build_context → derive_scope12derive_scope13. derive_scope → _declared_index_scope13_declared_index_scope▶ test enters14. _declared_index_scope → load_declaration_located14load_declaration_located15–18. load_declaration_located → _read_mapping15_read_mapping +3 more19–20. _checked_section → _checked_list_section19_checked_list_section +1 more

… 2 steps between

command-line usercommand-line usercommand-line usercommand-line userother filesother filesother filesother filesopt (line 531)optopt (line 445)optloop (line 417)loopopt (line 420)optalt (line 421)altopt (line 533)optmain23–24. all → list23list +1 more25–26. _checked_section → _checked_requirements25_checked_requirements +1 more27–29. _validate_node → _validate_map_of27_validate_map_of +2 more30–31. _validate_node → _validate_dict_node30_validate_dict_node +1 more32. _validate_dict_node → _suggest_key32_suggest_key33. _validate_dict_node → _validate_node33_validate_node34–35. _checked_section → _checked_tests34_checked_tests +1 more

… 8 steps between

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filesother filesopt (line 696)opttry (line 1003)tryopt (line 847)optloop (line 746)looploop (line 1055)loopopt (line 1075)optloop (line 1117)loopmain44. _declared_index_scope → _existing_paths44_existing_paths45. derive_scope → whole_repo_scope45whole_repo_scope46. whole_repo_scope → _gitignored_paths46_gitignored_paths47. _gitignored_paths → git_argv47git_argv48–49. git_argv → _no_ext_diff48_no_ext_diff +1 more50. _gitignored_paths → git_env50git_env51. whole_repo_scope → list51list52–56. whole_repo_scope → nested_repo_roots52nested_repo_roots +4 more57. nested_repo_roots → _nested_repos_under57_nested_repos_under58. whole_repo_scope → _gitignored_paths58_gitignored_paths59–60. whole_repo_scope → _pruned_dirs59_pruned_dirs +1 more61. _pruned_dirs → _skip_dir61_skip_dir62. _pruned_dirs → _descendable62_descendable63–64. _descendable → _is_within63_is_within +1 more65–68. whole_repo_scope → _declaration_note65_declaration_note +3 more69. derive_scope → whole_repo_scope69whole_repo_scope▶ test enters70–71. build_context → repo_source_files70repo_source_files +1 more

… 329 later steps

4 more

tests/test_guard_config_index.py:109 · its file's page

What it checks (2)

  1. assert f"no {CONFIG_FILE_NAME} was found" in reason observes derive_scope via reason
  2. assert "exists but carries no index_scope" in reason observes derive_scope via reason

Where the product reaches it

  • main → propose_main → propose → build_context → derive_scope (flow)

Call flow

test_the_scope_fallback_names_where_it_looked→derive_scope→_write

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_the_scope_fallback_names_where_it_looked · 2 checksderive_scopeREQ-DDB-CONFIG-001 · measuredderive_scope… 5 calls …_validate_nodeREQ-DDB-GUARD-012 · measuredderive_scope… 5 calls …allREQ-DDB-WIKI-054 · inferred
Also reaches 3 requirements

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