Orchestrata Ultimate › Tests › Reference › scripts › test_check_wiring

Tests reference — tests/scripts/test_check_wiring.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_check_wiring.py

source · 42 tests · 695 lines

Tests for scripts/check_wiring.py — the RUL-023 wiring gate ("when I ask

Kind Name Line Description
function test_module_docstring_names_rul_023 123
function test_module_dotted_name_plain_file 131
function test_module_dotted_name_init_file_is_none 135 A package marker is never independently reachable by import — its
function test_module_dotted_name_top_level_init_is_none 141
function test_module_dotted_name_non_src_prefix_is_none 145
function test_module_dotted_name_non_python_is_none 149
function test_iter_hook_commands_extracts_nested_commands 156
function test_iter_hook_commands_not_a_dict 171
function test_iter_hook_commands_no_hooks_key 175
function test_iter_hook_commands_hooks_not_a_dict 179
function test_iter_hook_commands_skips_malformed_entries 183
function test_added_paths_filters_by_status 196
function test_added_paths_handles_rename_status 201
function test_w1_unregistered_hook_fails 209
function test_w1_registered_hook_passes 223
function test_w1_missing_settings_file_fails 241
function test_w1_malformed_settings_json_fails 255
function test_w2_unreferenced_hook_fails 272
function test_w2_referenced_hook_passes 288
function test_w2_installer_itself_is_exempt 305 Adding install-git-hooks.sh itself (e.g. on a fresh repo) must never
function test_w2_missing_installer_fails 323
function test_w3_orphaned_module_fails 340
function test_w3_module_imported_from_another_package_passes 355 pkg_a/util.py is itself reachable (it's the fixture's entrypoint
function test_w3_module_reachable_only_via_unreachable_importer_still_fails 376 Regression for the false-positive proxy this replaced: the OLD W3
function test_w3_non_python_addition_under_src_is_ignored 408
function test_w4_unwired_gate_script_fails 433
function test_w4_gate_invoked_by_health_check_passes 452
function test_w4_gate_invoked_by_a_claude_hook_passes 470
function test_w4_script_not_added_in_diff_is_not_graded 494 A ruling can declare a gate script that predates this branch entirely
function test_rulings_dir_absent_skips_w4_but_runs_others 515
function test_no_diff_against_master_exits_zero_with_reason 534
function test_non_git_directory_exits_zero 544
function test_nonexistent_repo_root_exits_zero 554
function test_repo_with_no_master_branch_exits_zero 563
function test_cli_json_output_no_diff 582
function test_cli_text_output_fail_lists_violations 592
function test_cli_with_explicit_rulings_dir 608
function test_main_direct_json_skip 632
function test_main_direct_text_skip 643
function test_main_direct_text_pass 653
function test_main_direct_text_fail_lists_violations 667 Drives main() IN-PROCESS (not via subprocess, unlike the CLI
function test_main_default_repo_root_is_cwd 686 No --repo-root -> the CLI gates the process's own cwd. Driven via