|
Option C Tools
|
Functions | |
| Path | temp_project_root (Path tmp_path) |
| LinterContext | linter_ctx (Path temp_project_root) |
| str | make_compliant_file (str filename) |
| str | make_func_pattern_violation_file (str filename) |
Variables | |
| str | NON_COMPLIANT_FILE |
Shared fixtures for health dashboard tests.
Purpose
-------
Provide reusable test fixtures for health check unit and integration tests.
Responsibilities
----------------
- Create temporary Option C projects with required directory structure.
- Provide LinterContext for health check functions.
- Create compliant and non-compliant test files.
Diagnostics
-----------
Domain: TESTS.HEALTH
Levels:
L2 — test lifecycle and setup
L3 — fixture creation and teardown
L4 — file operations and structure verification
Contracts
---------
- temp_project_root fixture provides a clean, isolated test project.
- LinterContext is properly configured for the temporary project.
| LinterContext tests_health.conftest.linter_ctx | ( | Path | temp_project_root | ) |
Return a LinterContext configured for the temporary test project.
Definition at line 58 of file conftest.py.
| str tests_health.conftest.make_compliant_file | ( | str | filename | ) |
Generate a fully compliant Option C file with the given filename.
Definition at line 71 of file conftest.py.
| str tests_health.conftest.make_func_pattern_violation_file | ( | str | filename | ) |
Generate a file that is compliant except for a missing func pattern. The file has a function that calls ``_dbg()`` without first assigning ``func = "..."``. The file is long enough (>= 20 lines) to avoid the trivial-file exemption.
Definition at line 123 of file conftest.py.
| Path tests_health.conftest.temp_project_root | ( | Path | tmp_path | ) |
Create a temporary Option C project root with required directory structure. Returns the project root path. All required directories are created.
Definition at line 39 of file conftest.py.
| str tests_health.conftest.NON_COMPLIANT_FILE |
Definition at line 116 of file conftest.py.