Option C Tools
Loading...
Searching...
No Matches
tests_health.test_integration Namespace Reference

Functions

 test_health_terminal_output (Path temp_project_root, capsys)
 test_health_json_output (Path temp_project_root, capsys)
 test_health_json_lint_schema (Path temp_project_root, capsys)
 test_health_json_fixable_schema (Path temp_project_root, capsys)
 test_health_verbose_output (Path temp_project_root, capsys)
 test_health_empty_project (Path temp_project_root, capsys)
 test_health_test_status_no_tests_dir (Path temp_project_root, capsys)
 test_health_compat_check ()
 test_health_diagnostics_dir_fallback (Path temp_project_root, capsys)
 test_health_test_timeout_explicit_overrides_default (Path temp_project_root, monkeypatch)
 test_health_test_timeout_from_octrc (Path temp_project_root, monkeypatch)
 test_health_explicit_timeout_overrides_octrc (Path temp_project_root, monkeypatch)
 test_fixable_verbose_lists_violating_files (Path temp_project_root, LinterContext linter_ctx)
 test_fixable_non_verbose_omits_files_key (Path temp_project_root, LinterContext linter_ctx)
 test_fixable_verbose_no_violations_empty_files (Path temp_project_root, LinterContext linter_ctx)

Detailed Description

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.

Function Documentation

◆ test_fixable_non_verbose_omits_files_key()

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.

◆ test_fixable_verbose_lists_violating_files()

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.

◆ test_fixable_verbose_no_violations_empty_files()

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.

◆ test_health_compat_check()

tests_health.test_integration.test_health_compat_check ( )
Test that compat check returns valid structure.

Definition at line 149 of file test_integration.py.

◆ test_health_diagnostics_dir_fallback()

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.

◆ test_health_empty_project()

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.

◆ test_health_explicit_timeout_overrides_octrc()

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.

◆ test_health_json_fixable_schema()

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.

◆ test_health_json_lint_schema()

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.

◆ test_health_json_output()

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.

◆ test_health_terminal_output()

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.

◆ test_health_test_status_no_tests_dir()

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.

◆ test_health_test_timeout_explicit_overrides_default()

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.

◆ test_health_test_timeout_from_octrc()

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.

◆ test_health_verbose_output()

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.