Orchestrata Ultimate › Tests › Reference › scripts › test_scan_imperative_accumulators

Tests reference — tests/scripts/test_scan_imperative_accumulators.py

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

Prose pending.

tests/scripts/test_scan_imperative_accumulators.py

source · 26 tests · 342 lines

Tests for scripts/scan_imperative_accumulators.py — the accumulator census

Kind Name Line Description
function test_style_checker_loads_live_style_checker_class 47
function test_style_checker_registers_module_in_sys_modules 54
function test_style_checker_systemexit_when_reviewer_not_loadable 67 A path whose suffix no loader handles yields spec/loader None -> exit.
function test_style_checker_points_at_real_reviewer_script 82
function test_sites_finds_simple_accumulate_only_loop 92
function test_sites_reports_multiple_vars_sorted 103
function test_sites_finds_async_function_with_async_for 116
function test_sites_finds_annotated_empty_ctor_init 127
function test_sites_function_without_accumulator_init_is_skipped 143
function test_sites_accumulator_init_without_any_loop 150
function test_sites_loop_with_mixed_body_rejected 155
function test_sites_loop_growing_a_non_accumulator_name_rejected 167
function test_sites_loop_with_non_call_expression_body_rejected 178
function test_sites_loop_with_non_expression_statement_rejected 189
function test_sites_empty_loop_body_rejected_via_constructed_ast 200 not loop.body is unreachable from parsed source (a valid For always
function test_sites_top_level_loop_outside_function_ignored 229
function test_main_json_output_over_directory_root 247
function test_main_text_output_single_file_root 259
function test_main_text_output_empty_findings 269
function test_main_recurses_into_subdirectories_and_orders_by_count 277
function test_main_skips_syntax_error_files 291
function test_main_skips_unicode_decode_error_files 301
function test_main_json_empty_findings_is_empty_list 308
function test_main_requires_at_least_one_root 315
function test_script_path_resolves_and_module_docstring_describes_usage 327
function test_scan_of_this_test_file_via_importlib_loaded_module 332 Independent load through importlib (mirrors test_auto_fix.py's seam):