Orchestrata Ultimate › Tests › Reference › scripts › test_codemod_cli

Tests reference — tests/scripts/test_codemod_cli.py

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

Prose pending.

tests/scripts/test_codemod_cli.py

source · 62 tests · 1716 lines

Real-behavior tests for scripts/codemod.py (SPEC-110 codemod engine CLI).

Covers: core.base.traces, refactor.codemod._cig, refactor.codemod._csr_index, refactor.codemod._types, refactor.codemod.passes

Kind Name Line Description
function test_main_help_returns_zero 106
function test_main_invalid_subcommand_returns_two 111
function test_main_missing_subcommand_returns_two 118
function test_main_guard_executes_main_and_exits_with_its_code 122
function test_resolve_include_defaults 140
function test_resolve_include_explicit 145
function test_parse_args_empty 149
function test_parse_args_key_value_split_on_first_equals 154
function test_resolve_pass_replace_string_full_args 166
function test_resolve_pass_replace_string_defaults 178
function test_resolve_pass_add_import 185
function test_resolve_pass_add_import_module_only 195
function test_resolve_pass_remove_unused_import 202
function test_resolve_pass_docstring_sweep_numbered_pairs 208
function test_resolve_pass_docstring_sweep_plain_old_new 218
function test_resolve_pass_docstring_sweep_empty 224
function test_resolve_pass_unknown_exits_2 230
function test_resolve_pass_rename_symbol_exits_2 239
function test_resolve_cig_node_all_strategies 253
function test_load_bench_reports_stats 272
function test_run_dry_run_produces_report_without_writing 290
function test_run_review_abort_exits_1_in_dry_run_and_apply 329 --baseline absolute: a review that aborts the commit fails the run.
function test_run_default_baseline_is_delta_and_a_legacy_error_does_not_abort 373 ADR-0073: by default only an error the change introduced aborts the run.
function test_run_default_baseline_aborts_when_the_pass_introduces_an_error 420 ADR-0073 default: an error the change introduces aborts, dry run and apply.
function test_run_default_baseline_aborts_on_an_in_place_edit_of_a_legacy_secret_line 456 B1: replace-string old=PLACEHOLDER new=sk-... edits a line that already
function test_run_baseline_rejects_values_other_than_delta_and_absolute 492
function test_run_apply_writes_changes_and_custom_report 503
function test_run_observe_apply_attaches_the_five_observers 542 run --observe --apply: the real built-in observers watch the run.
function test_run_without_observe_attaches_no_observers 646 The default stays "nobody watches": no trace artefact appears.
function test_run_apply_two_passes_editing_one_file_commits_both 681 --pass A --pass B --apply where both passes edit the SAME file.
function test_run_leaves_a_literal_whose_replacement_is_not_valid_source 733
function test_run_unknown_pass_exits_2 756
function test_report_missing_file_returns_2 781
function test_report_full_report_pretty_printed 790
function test_report_minimal_report_uses_defaults 839
function test_analyze_module_required_returns_2 860
function test_analyze_unknown_module_returns_1 871
function test_analyze_dependencies 897
function test_analyze_dependents 922
function test_analyze_blast_radius 944
function test_analyze_cycles_none 971
function test_analyze_topological_order_small_repo 982
function test_analyze_topological_order_truncates_beyond_20 1004
function test_analyze_coupling_score 1025
function test_analyze_abstraction_level 1050
function test_analyze_centrality_approximate 1075
function test_analyze_centrality_exact_top_k 1086
function test_analyze_impact_score 1109
function test_auto_start_without_deployment_prints_the_error_verbatim_and_exits_1 1162
function test_no_daemon_overrides_auto_start 1179 --no-daemon keeps library mode: the daemon is never consulted, so
function test_auto_start_daemon_returns_the_error_text_for_a_missing_deployment 1195
function test_auto_start_daemon_is_not_wedged_by_a_stale_pid_file_under_an_inactive_unit 1209 Reviewer's probe (P4 review round 2, N3): the unit is loaded but
function test_auto_start_daemon_starts_the_unit_once_then_finds_it_running 1257 With a real deployment + unit the first call starts the daemon and the
function test_auto_start_waits_for_the_socket_and_the_cli_then_connects_quietly 1309 The unit's launcher creates the socket a second AFTER it starts (the real
function test_auto_start_daemon_says_so_when_the_unit_starts_but_never_serves 1353
function test_auto_start_daemon_stops_waiting_when_the_unit_dies_before_serving 1408
function test_auto_start_cli_exits_1_with_the_failed_text_when_the_unit_dies 1441
function test_analyze_pass_queries_exit_zero_with_json_output 1496 TST-110-020: complexity|test_coverage|dead_code|breaking_changes|all-passes --json.
function test_analyze_routed_queries_keep_text_output_and_gain_json 1574
function test_analyze_pass_queries_print_text_sections 1600
function test_analyze_pass_queries_report_bad_input 1649
function test_breaking_changes_base_reads_the_repo_subdirectory_not_the_toplevel 1690 --repo pointing at a subdirectory of a git repo: git show resolves