Orchestrata Ultimate › Tests › Reference › verification › autofix
Tests reference — tests/verification/autofix
tests/verification/autofix — 7 test modules, 95 test functions. Source tree: tests/verification/autofix at commit 8a2cb42ad. Generated from the tests AST snapshot by scripts/gen-data-pages.py.
Prose pending.
Modules
| Module | Tests | Covers |
|---|---|---|
test_engine.py |
4 | 2 |
test_format_fixes.py |
23 | 1 |
test_helpers.py |
9 | 1 |
test_import_fixes.py |
28 | 1 |
test_redis_fixes.py |
29 | 1 |
test_types.py |
2 | 1 |
Module details
tests/verification/autofix/test_engine.py
source · 4 tests · 54 lines
Tests for verification.autofix.engine.
Covers: verification.autofix.engine, verification.autofix.types
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestRunAllAutofixes |
27 | |
| method | TestRunAllAutofixes.test_empty_workspace |
28 | |
| method | TestRunAllAutofixes.test_fixes_relative_imports |
33 | |
| method | TestRunAllAutofixes.test_fixes_f821_datetime |
40 | |
| method | TestRunAllAutofixes.test_fixes_parse_args |
48 |
tests/verification/autofix/test_format_fixes.py
source · 23 tests · 160 lines
Tests for verification.autofix.format_fixes.
Covers: verification.autofix.format_fixes
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestAutofixLineLength |
34 | |
| method | TestAutofixLineLength.test_runs_without_crash |
35 | |
| method | TestAutofixLineLength.test_missing_python_ignored |
39 | |
| class | TestAutofixParseArgs |
44 | |
| method | TestAutofixParseArgs.test_fixes_parse_args |
45 | |
| method | TestAutofixParseArgs.test_no_change_when_already_fixed |
54 | |
| method | TestAutofixParseArgs.test_skips_non_python |
60 | |
| method | TestAutofixParseArgs.test_multiple_files |
65 | |
| class | TestHasDatetimeImport |
72 | |
| method | TestHasDatetimeImport.test_from_datetime_import |
73 | |
| method | TestHasDatetimeImport.test_from_datetime_import_multiple |
76 | |
| method | TestHasDatetimeImport.test_import_datetime |
79 | |
| method | TestHasDatetimeImport.test_missing |
82 | |
| method | TestHasDatetimeImport.test_from_datetime_without_datetime |
85 | |
| class | TestAddDatetimeImport |
89 | |
| method | TestAddDatetimeImport.test_extends_existing_import |
90 | |
| method | TestAddDatetimeImport.test_adds_after_import_os |
95 | |
| method | TestAddDatetimeImport.test_prepends_when_no_import |
101 | |
| method | TestAddDatetimeImport.test_no_duplicate_when_already_present |
106 | |
| class | TestAutofixF821Datetime |
113 | |
| method | TestAutofixF821Datetime.test_adds_missing_import |
114 | |
| method | TestAutofixF821Datetime.test_skips_when_import_present |
121 | |
| method | TestAutofixF821Datetime.test_skips_no_datetime_usage |
127 | |
| method | TestAutofixF821Datetime.test_detects_utcnow |
133 | |
| method | TestAutofixF821Datetime.test_detects_fromisoformat |
139 | |
| class | TestSafeRead |
146 | |
| method | TestSafeRead.test_reads_file |
147 | |
| method | TestSafeRead.test_missing_file |
152 | |
| class | TestSafeWrite |
156 | |
| method | TestSafeWrite.test_writes_file |
157 |
tests/verification/autofix/test_helpers.py
source · 9 tests · 96 lines
Tests for verification.autofix.helpers.
Covers: verification.autofix.helpers
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestWalkPythonFiles |
28 | |
| method | TestWalkPythonFiles.test_finds_python_files |
29 | |
| method | TestWalkPythonFiles.test_skips_non_python |
36 | |
| method | TestWalkPythonFiles.test_skips_venv |
43 | |
| method | TestWalkPythonFiles.test_skips_pycache |
52 | |
| method | TestWalkPythonFiles.test_skips_git |
60 | |
| method | TestWalkPythonFiles.test_skips_site_packages |
68 | |
| method | TestWalkPythonFiles.test_skips_hidden_dirs |
76 | |
| method | TestWalkPythonFiles.test_nested_directories |
84 | |
| method | TestWalkPythonFiles.test_returns_absolute_paths |
92 |
tests/verification/autofix/test_import_fixes.py
source · 28 tests · 286 lines
Covers: verification.autofix.import_fixes
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_detect_package_name_src_layout |
53 | |
| function | test_detect_package_name_flat_layout |
60 | |
| function | test_detect_package_name_no_package |
67 | |
| function | test_detect_flat_package_skips_special_dirs |
71 | |
| function | test_detect_flat_package_finds_valid |
78 | |
| function | test_autofix_relative_imports_converts_dots |
90 | |
| function | test_autofix_relative_imports_no_package |
104 | |
| function | test_autofix_relative_imports_skips_venv |
109 | |
| function | test_autofix_missing_stdlib_json |
127 | |
| function | test_autofix_missing_stdlib_skips_existing |
139 | |
| function | test_autofix_missing_stdlib_no_usage |
149 | |
| function | test_add_stdlib_imports_adds_json |
164 | |
| function | test_add_stdlib_imports_no_change_when_present |
170 | |
| function | test_add_stdlib_imports_no_usage |
176 | |
| function | test_add_barename_imports_timedelta |
187 | |
| function | test_add_barename_imports_optional |
193 | |
| function | test_add_barename_imports_list |
199 | |
| function | test_add_barename_imports_any |
205 | |
| function | test_add_barename_imports_skips_existing |
211 | |
| function | test_add_barename_imports_skips_module_import |
217 | |
| function | test_extend_or_add_import_extends_existing |
223 | |
| function | test_extend_or_add_import_adds_new |
229 | |
| function | test_extend_or_add_import_prepends_when_no_import |
235 | |
| function | test_autofix_missing_barename |
246 | |
| function | test_autofix_missing_barename_no_matches |
258 | |
| function | test_safe_read_success |
273 | |
| function | test_safe_read_missing |
279 | |
| function | test_safe_write_and_read |
283 |
tests/verification/autofix/test_redis_fixes.py
source · 29 tests · 309 lines
Covers: verification.autofix.redis_fixes
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_replace_aioredis_imports_basic |
54 | |
| function | test_replace_aioredis_imports_from_redis |
60 | |
| function | test_replace_aioredis_imports_no_change |
66 | |
| function | test_replace_aioredis_usage_replaces_aioredis |
77 | |
| function | test_replace_aioredis_usage_passthrough |
84 | |
| function | test_autofix_aioredis_fixes_file |
95 | |
| function | test_autofix_aioredis_no_redis_content |
104 | |
| function | test_autofix_sync_redis_converts_import |
116 | |
| function | test_autofix_sync_redis_skips_asyncio_already |
126 | |
| function | test_autofix_sync_redis_skips_no_redis_usage |
133 | |
| function | test_autofix_redis_decode_adds_param |
145 | |
| function | test_autofix_redis_decode_skips_if_present |
154 | |
| function | test_autofix_redis_decode_no_redis |
161 | |
| function | test_autofix_redis_host_replaces_localhost |
173 | |
| function | test_autofix_redis_host_replaces_redis_localhost |
183 | |
| function | test_autofix_redis_host_replaces_port |
192 | |
| function | test_autofix_redis_host_skips_non_test |
201 | |
| function | test_replace_hardcoded_host |
213 | |
| function | test_replace_hardcoded_redis_call |
219 | |
| function | test_replace_hardcoded_port |
225 | |
| function | test_autofix_xadd_dict_to_dict |
236 | |
| function | test_autofix_xadd_dict_kwargs |
245 | |
| function | test_autofix_xadd_dict_no_xadd |
254 | |
| function | test_autofix_hset_dict_mapping_to_dict |
266 | |
| function | test_autofix_hset_dict_mapping_splat |
275 | |
| function | test_autofix_hset_dict_no_hset |
284 | |
| function | test_safe_read_success |
296 | |
| function | test_safe_read_missing |
302 | |
| function | test_safe_write_and_read |
306 |
tests/verification/autofix/test_types.py
source · 2 tests · 35 lines
Tests for verification.autofix.types.
Covers: verification.autofix.types
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestAutofixResult |
26 | |
| method | TestAutofixResult.test_defaults |
27 | |
| method | TestAutofixResult.test_with_values |
32 |
Support files
Fixtures, package markers and helpers without test functions.