|
Option C Tools
|
Functions | |
| test_formatter_processes_project (Path temp_project_root) | |
| test_formatter_dry_run_no_changes (Path temp_project_root) | |
| test_formatter_fix_mode_applies_changes (Path temp_project_root) | |
| test_formatter_json_output (Path temp_project_root, capsys) | |
| test_formatter_verbose_output (Path temp_project_root, capsys) | |
| test_formatter_respects_exclusions (Path temp_project_root) | |
| test_formatter_handles_syntax_errors (Path temp_project_root) | |
| test_formatter_counts_files_correctly (Path temp_project_root, capsys) | |
Integration tests for the formatter.
Purpose
-------
Verify end-to-end formatter behavior with complete projects.
Responsibilities
----------------
- Test dry-run mode (no modifications).
- Test fix mode (applies all fixes).
- Test JSON output format.
- Test exclusion list behavior.
- Test verbose output.
Diagnostics
-----------
Domain: TESTS.FORMATTER
Levels:
L2 — test lifecycle
L3 — full project processing
L4 — output validation and file state verification
Contracts
---------
- Dry-run reports changes without modifying files.
- Fix mode applies all changes and archives originals.
- JSON output is valid JSON with correct schema.
- Excluded directories are never processed.
| tests_formatter.test_integration.test_formatter_counts_files_correctly | ( | Path | temp_project_root, |
| capsys ) |
Test that file counts are accurate.
Definition at line 180 of file test_integration.py.
| tests_formatter.test_integration.test_formatter_dry_run_no_changes | ( | Path | temp_project_root | ) |
Test that dry-run mode doesn't modify files.
Definition at line 61 of file test_integration.py.
| tests_formatter.test_integration.test_formatter_fix_mode_applies_changes | ( | Path | temp_project_root | ) |
Test that fix mode applies changes and archives originals.
Definition at line 77 of file test_integration.py.
| tests_formatter.test_integration.test_formatter_handles_syntax_errors | ( | Path | temp_project_root | ) |
Test that formatter handles syntax errors gracefully.
Definition at line 171 of file test_integration.py.
| tests_formatter.test_integration.test_formatter_json_output | ( | Path | temp_project_root, |
| capsys ) |
Test that JSON output is valid and has correct schema.
Definition at line 102 of file test_integration.py.
| tests_formatter.test_integration.test_formatter_processes_project | ( | Path | temp_project_root | ) |
Test that formatter can process an entire project.
Definition at line 45 of file test_integration.py.
| tests_formatter.test_integration.test_formatter_respects_exclusions | ( | Path | temp_project_root | ) |
Test that excluded directories are not processed.
Definition at line 156 of file test_integration.py.
| tests_formatter.test_integration.test_formatter_verbose_output | ( | Path | temp_project_root, |
| capsys ) |
Test that verbose mode shows per-file details.
Definition at line 135 of file test_integration.py.