Orchestrata Ultimate › Tests › Reference › scripts › test_rulings_lint

Tests reference — tests/scripts/test_rulings_lint.py

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

Prose pending.

tests/scripts/test_rulings_lint.py

source · 42 tests · 535 lines

Tests for scripts/rulings_lint.py — the SPEC-023 rulings-enforcement lint

Kind Name Line Description
function test_extract_enforcement_lines_collects_bullets_until_next_heading 103
function test_extract_enforcement_lines_empty_when_no_section 112
function test_extract_enforcement_lines_stops_at_end_of_file 117
function test_check_hook_pass_real_hook 125
function test_check_hook_fail_missing_path 131
function test_check_hook_fail_not_executable 137
function test_check_hook_git_hooks_path_resolves_from_a_worktree 149 RUL-008 declares hook .git/hooks/pre-commit. In a git worktree
function test_check_gate_pass_real_script_and_rule_id 204
function test_check_gate_fail_missing_script 210
function test_check_gate_fail_rule_id_not_in_script 216
function test_check_gate_fail_malformed_directive 222
function test_check_banned_deps_pass_real_entry 228
function test_check_banned_deps_case_insensitive 233
function test_check_banned_deps_fail_unknown_entry 238
function test_check_constitution_pass_real_article 244
function test_check_constitution_fail_missing_article 250
function test_check_none_pass_with_judgment_marker 256
function test_check_none_fail_without_judgment_marker 262
function test_evaluate_directive_unknown_kind_fails 270
function test_evaluate_directive_empty_fails 276
function test_evaluate_directive_marks_judgment_only_on_none 281
function test_evaluate_directive_gate_is_not_judgment 287
function test_evaluate_ruling_file_all_pass 296
function test_evaluate_ruling_file_one_bad_mechanism_fails 309
function test_evaluate_ruling_file_judgment_only 321
function test_evaluate_ruling_file_no_enforcement_section_fails 329
function test_evaluate_ruling_file_skips_non_rul_files 337
function test_lint_missing_dir_is_a_skip_not_a_fail 346
function test_lint_all_pass_exits_zero 354
function test_lint_deliberate_breakage_nonexistent_hook_fails 365 The plan's mandated deliberate-breakage proof: point a ruling at a
function test_lint_mixed_pass_and_fail_reports_both 378
function test_main_json_flag_prints_valid_json 391
function test_main_text_output_reports_failures 401
function test_main_skip_prints_warning 410
function test_main_text_output_all_pass_with_judgment_entries 418 Hits the text-report's pass branch AND the judgment-only summary
function test_default_rulings_dir_reads_env_at_call_time 432 RUL-003: RULINGS_DIR must be read via os.environ.get at call time —
function test_default_rulings_dir_reads_env_absent_dir_skips 456 The genuinely-absent-directory counterpart to the test above.
function test_default_rulings_dir_helper_matches_call_time_env 475 In-process call of _default_rulings_dir() (RUL-003 call-time env
function test_check_gate_fail_unreadable_script 488 A path that EXISTS but is a directory, not a file, hits the
function test_check_banned_deps_missing_file 500
function test_check_constitution_missing_file 507
function test_live_canon_lints_clean_or_skips_cleanly 517 Runs the real CLI with no overrides against whatever RULINGS_DIR