Option C Tools
Loading...
Searching...
No Matches
tests_formatter.conftest Namespace Reference

Functions

Path temp_project_root (Path tmp_path)
FormatterContext formatter_ctx (Path temp_project_root)
FormatterContext formatter_ctx_fix (Path temp_project_root)

Detailed Description

Shared fixtures for formatter tests.

Purpose
-------
Provide reusable test fixtures for formatter unit and integration tests.

Responsibilities
----------------
- Create temporary Option C projects with required directory structure.
- Provide FormatterContext for testing.
- Copy test fixture files into temporary project.
- Clean up after tests.

Diagnostics
-----------
Domain: TESTS.FORMATTER
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.
- All fixture files are available in the temporary project.
- FormatterContext is properly configured for the temporary project.

Function Documentation

◆ formatter_ctx()

FormatterContext tests_formatter.conftest.formatter_ctx ( Path temp_project_root)
Return a FormatterContext configured for the temporary test project.

Context is in dry-run mode (not fix mode) by default.

Definition at line 61 of file conftest.py.

◆ formatter_ctx_fix()

FormatterContext tests_formatter.conftest.formatter_ctx_fix ( Path temp_project_root)
Return a FormatterContext in fix mode for actual file modifications.

Definition at line 81 of file conftest.py.

◆ temp_project_root()

Path tests_formatter.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 42 of file conftest.py.