|
Option C Tools
|
Functions | |
| Path | temp_project_root (Path tmp_path) |
| oct_lint.LinterContext | linter_ctx (Path temp_project_root) |
Purpose
-------
Provide pytest fixtures for the OCT linter test suite.
Responsibilities
----------------
- Create a temporary, isolated Option C project root.
- Populate the required Option C project structure.
- Copy fixture files into the temporary project.
- Provide a ``LinterContext`` fixture for unit tests that call linter
functions directly, without triggering ``run_linter()``.
- Ensure each test runs in a clean, deterministic environment.
Diagnostics
-----------
Domain: LINTER-TESTS
Levels:
L2 — lifecycle
L3 — semantic details
L4 — deep tracing
Contracts
---------
- Must not import or modify the developer's real project.
- Must not modify fixture files.
- Must ensure deterministic test environments.
| oct_lint.LinterContext tests_linter.conftest.linter_ctx | ( | Path | temp_project_root | ) |
Return a ``LinterContext`` for the temporary project root. Use this fixture in unit tests that call linter check functions (``validate_header_block``, ``fix_header_block``, ``check_tests_exist``) directly, rather than going through ``run_linter()``.
Definition at line 115 of file conftest.py.
| Path tests_linter.conftest.temp_project_root | ( | Path | tmp_path | ) |
Create a temporary Option C project root with: - docs/ - tests/ - oc_diagnostics/ - logs/ - tests_linter/fixtures copied in
Definition at line 42 of file conftest.py.