Orchestrata Ultimate › Tests › Reference › scripts › test_auto_fix

Tests reference — tests/scripts/test_auto_fix.py

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

Prose pending.

tests/scripts/test_auto_fix.py

source · 31 tests · 379 lines

Tests for scripts/auto_fix.py — the deterministic auto-fixer for common

Kind Name Line Description
function test_apply_to_file_read_error_unicode_decode_verbose 51
function test_apply_to_file_read_error_quiet 62
function test_apply_to_file_no_modification_returns_false 72
function test_apply_to_file_modifies_and_writes_verbose 81
function test_apply_to_file_write_error_permission_denied 94
function test_relative_import_fixer_leaves_absolute_imports_untouched 113
function test_relative_import_fixer_converts_multiple_relative_imports 120
function test_line_length_fixer_splits_long_line_at_comma_before_88 133
function test_line_length_fixer_ignores_comment_lines 146
function test_line_length_fixer_no_comma_no_split 155
function test_line_length_fixer_comma_only_after_column_88_no_split 162
function test_line_length_fixer_actually_shortens_via_apply_to_file 170 Regression for the fixed bug: apply_to_file must observe the file
function test_import_order_fixer_is_a_noop 187
function test_redis_host_fixer_replaces_localhost_and_adds_os_import 197
function test_redis_host_fixer_replaces_127_0_0_1_asyncio_variant 206
function test_redis_host_fixer_does_not_duplicate_existing_os_import 214
function test_redis_host_fixer_no_match_leaves_content_unchanged 224
function test_missing_datetime_fixer_inserts_import_before_first_code_line 234
function test_missing_datetime_fixer_skips_when_already_imported 246
function test_missing_datetime_fixer_skips_when_bare_import_datetime_present 253
function test_missing_datetime_fixer_no_datetime_usage_unchanged 260
function test_missing_datetime_fixer_only_comments_and_imports_no_insertion_point 267 If every line is an import or a comment, no non-import code line is
function test_find_python_files_recurses 279
function test_cli_list_fixers 294
function test_cli_no_python_files_found 302
function test_cli_all_fixers_disabled 310
function test_cli_fixes_files_verbose_and_reports_summary 328
function test_cli_accepts_single_file_path 346
function test_cli_ignores_non_python_file_argument 355
function test_cli_disable_specific_fixer_leaves_target_pattern_untouched 363
function test_cli_default_path_is_cwd 375