|
Option C Tools
|
Functions | |
| test_func_pattern_valid (Path temp_project_root) | |
| test_func_pattern_missing (Path temp_project_root) | |
| test_func_pattern_trivial_exempt (Path temp_project_root) | |
| test_func_pattern_no_dbg_calls (Path temp_project_root) | |
| test_func_pattern_decorated (Path temp_project_root) | |
| test_func_pattern_async (Path temp_project_root) | |
| test_func_pattern_nested_inner_missing (Path temp_project_root) | |
| test_func_pattern_multiline_signature (Path temp_project_root) | |
| test_func_pattern_after_type_annotation () | |
Purpose ------- Validate the linter's func = "..." pattern detection logic. Responsibilities ---------------- - Confirm that compliant files pass check_func_pattern(). - Confirm that non-compliant files fail check_func_pattern() with a useful error message. - Confirm that trivial files (< 20 lines) are exempt from the check. - Confirm that functions with no _dbg() calls are not flagged. Diagnostics ----------- Domain: LINTER-TESTS L2: test lifecycle L3: assertion details L4: deep tracing Contracts --------- Inputs: temp_project_root pytest fixture (conftest.py) Outputs: pass/fail assertions
| tests_linter.test_func_pattern.test_func_pattern_after_type_annotation | ( | ) |
func = '...' after a type annotation should pass (OI-409).
Definition at line 103 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_async | ( | Path | temp_project_root | ) |
Async functions with correct func = '...' + _dbg() pass.
Definition at line 77 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_decorated | ( | Path | temp_project_root | ) |
Decorated functions with correct func = '...' + _dbg() pass.
Definition at line 69 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_missing | ( | Path | temp_project_root | ) |
Files where _dbg() is called without a preceding func = "..." fail.
Definition at line 43 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_multiline_signature | ( | Path | temp_project_root | ) |
Multi-line function signatures with correct pattern pass.
Definition at line 95 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_nested_inner_missing | ( | Path | temp_project_root | ) |
Nested function missing func = '...' fails independently of outer.
Definition at line 85 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_no_dbg_calls | ( | Path | temp_project_root | ) |
Functions that never call _dbg() do not need func = '...'.
Definition at line 61 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_trivial_exempt | ( | Path | temp_project_root | ) |
Files under 20 lines are exempt — same threshold as check_dbg_usage.
Definition at line 53 of file test_func_pattern.py.
| tests_linter.test_func_pattern.test_func_pattern_valid | ( | Path | temp_project_root | ) |
Files where every _dbg()-using function defines func = "..." pass.
Definition at line 35 of file test_func_pattern.py.