Skip to content

Commit 68b4a18

Browse files
Add README examples listing guard test
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent db2ba7e commit 68b4a18

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ This runs lint, format checks, compile checks, tests, and package build.
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),
8787
- `tests/test_pyproject_architecture_marker.py` (pytest marker registration enforcement),
88-
- `tests/test_architecture_marker_usage.py` (architecture marker coverage across guard modules).
88+
- `tests/test_architecture_marker_usage.py` (architecture marker coverage across guard modules),
89+
- `tests/test_readme_examples_listing.py` (README example-listing consistency enforcement).
8990

9091
## Code quality conventions
9192

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import re
2+
from pathlib import Path
3+
4+
import pytest
5+
6+
pytestmark = pytest.mark.architecture
7+
8+
9+
def test_readme_example_list_references_existing_example_files():
10+
readme_text = Path("README.md").read_text(encoding="utf-8")
11+
listed_examples = re.findall(r"- `([^`]*examples/[^`]*)`", readme_text)
12+
13+
assert listed_examples != []
14+
for example_path in listed_examples:
15+
assert Path(example_path).is_file()

0 commit comments

Comments
 (0)