Skip to content

Commit eb0c64a

Browse files
Add architecture marker coverage guard test
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 533f8d2 commit eb0c64a

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ This runs lint, format checks, compile checks, tests, and package build.
8484
- `tests/test_display_helper_usage.py` (display/key-format helper usage),
8585
- `tests/test_ci_workflow_quality_gates.py` (CI guard-stage + make-target enforcement),
8686
- `tests/test_makefile_quality_targets.py` (Makefile quality-gate target enforcement),
87-
- `tests/test_pyproject_architecture_marker.py` (pytest marker registration enforcement).
87+
- `tests/test_pyproject_architecture_marker.py` (pytest marker registration enforcement),
88+
- `tests/test_architecture_marker_usage.py` (architecture marker coverage across guard modules).
8889

8990
## Code quality conventions
9091

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from pathlib import Path
2+
3+
import pytest
4+
5+
pytestmark = pytest.mark.architecture
6+
7+
8+
ARCHITECTURE_GUARD_MODULES = (
9+
"tests/test_guardrail_ast_utils.py",
10+
"tests/test_manager_model_dump_usage.py",
11+
"tests/test_mapping_reader_usage.py",
12+
"tests/test_mapping_keys_access_usage.py",
13+
"tests/test_tool_mapping_reader_usage.py",
14+
"tests/test_display_helper_usage.py",
15+
"tests/test_ci_workflow_quality_gates.py",
16+
"tests/test_makefile_quality_targets.py",
17+
"tests/test_pyproject_architecture_marker.py",
18+
"tests/test_architecture_marker_usage.py",
19+
)
20+
21+
22+
def test_architecture_guard_modules_are_marked():
23+
for module_path in ARCHITECTURE_GUARD_MODULES:
24+
module_text = Path(module_path).read_text(encoding="utf-8")
25+
assert "pytestmark = pytest.mark.architecture" in module_text

0 commit comments

Comments
 (0)