|
Option C Tools
|
Integration tests for the health dashboard.
Purpose
-------
Verify end-to-end health report generation with complete projects.
Responsibilities
----------------
- Test terminal output format.
- Test JSON output format and schema.
- Test verbose output mode.
- Test health report with various project states.
Diagnostics
-----------
Domain: TESTS.HEALTH
Levels:
L2 — test lifecycle
L3 — full report generation
L4 — output validation and schema verification
Contracts
---------
- JSON output is valid JSON with correct schema.
- Terminal output includes all sections.
- Verbose mode shows per-file breakdown.
| tests_health.test_integration.test_fixable_non_verbose_omits_files_key | ( | Path | temp_project_root, |
| LinterContext | linter_ctx ) |
Non-verbose fixable check must not include a 'files' key (backward compat).
Definition at line 272 of file test_integration.py.
| tests_health.test_integration.test_fixable_verbose_lists_violating_files | ( | Path | temp_project_root, |
| LinterContext | linter_ctx ) |
Verbose fixable check must list files with func_pattern violations.
Definition at line 253 of file test_integration.py.
| tests_health.test_integration.test_fixable_verbose_no_violations_empty_files | ( | Path | temp_project_root, |
| LinterContext | linter_ctx ) |
Verbose fixable check with a compliant file must return empty files list.
Definition at line 286 of file test_integration.py.
| tests_health.test_integration.test_health_compat_check | ( | ) |
Test that compat check returns valid structure.
Definition at line 149 of file test_integration.py.
| tests_health.test_integration.test_health_diagnostics_dir_fallback | ( | Path | temp_project_root, |
| capsys ) |
Test fallback to diagnostics/ directory.
Definition at line 160 of file test_integration.py.
| tests_health.test_integration.test_health_empty_project | ( | Path | temp_project_root, |
| capsys ) |
Test health report on empty project.
Definition at line 124 of file test_integration.py.
| tests_health.test_integration.test_health_explicit_timeout_overrides_octrc | ( | Path | temp_project_root, |
| monkeypatch ) |
Explicit test_timeout wins over .octrc.json health.test_timeout (OI-413).
Definition at line 226 of file test_integration.py.
| tests_health.test_integration.test_health_json_fixable_schema | ( | Path | temp_project_root, |
| capsys ) |
Test that JSON fixable section has correct schema.
Definition at line 95 of file test_integration.py.
| tests_health.test_integration.test_health_json_lint_schema | ( | Path | temp_project_root, |
| capsys ) |
Test that JSON lint section has correct schema.
Definition at line 79 of file test_integration.py.
| tests_health.test_integration.test_health_json_output | ( | Path | temp_project_root, |
| capsys ) |
Test that JSON output is valid and has correct schema.
Definition at line 60 of file test_integration.py.
| tests_health.test_integration.test_health_terminal_output | ( | Path | temp_project_root, |
| capsys ) |
Test that terminal output includes all sections.
Definition at line 43 of file test_integration.py.
| tests_health.test_integration.test_health_test_status_no_tests_dir | ( | Path | temp_project_root, |
| capsys ) |
Test that missing tests/ directory is handled.
Definition at line 136 of file test_integration.py.
| tests_health.test_integration.test_health_test_timeout_explicit_overrides_default | ( | Path | temp_project_root, |
| monkeypatch ) |
Explicit test_timeout parameter is threaded through to check_test_health (OI-413).
Definition at line 180 of file test_integration.py.
| tests_health.test_integration.test_health_test_timeout_from_octrc | ( | Path | temp_project_root, |
| monkeypatch ) |
health.test_timeout in .octrc.json is honored when no explicit value (OI-413).
Definition at line 203 of file test_integration.py.
| tests_health.test_integration.test_health_verbose_output | ( | Path | temp_project_root, |
| capsys ) |
Test that verbose mode shows per-file breakdown.
Definition at line 112 of file test_integration.py.