-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_roadmap.py
More file actions
33 lines (25 loc) · 1003 Bytes
/
test_roadmap.py
File metadata and controls
33 lines (25 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
import re
import pytest
from conftest import REPO_ROOT
def test_has_single_current_marker(roadmap_text):
matches = re.findall(r"\(current\)", roadmap_text, re.IGNORECASE)
assert len(matches) == 1, (
f"ROADMAP.md should have exactly one '(current)' marker, found {len(matches)}"
)
def test_completed_section_no_unchecked(roadmap_text):
completed_match = re.search(
r"##\s+Completed\s*\n(.*?)(?=\n##|\Z)", roadmap_text, re.DOTALL
)
if completed_match:
section = completed_match.group(1)
unchecked = re.findall(r"- \[ \]", section)
assert len(unchecked) == 0, (
f"ROADMAP.md Completed section has {len(unchecked)} unchecked items"
)
def test_no_duplicate_version_entries(roadmap_text):
versions = re.findall(r"^##\s+(v\d+\.\d+\.\d+)", roadmap_text, re.MULTILINE)
seen = set()
for v in versions:
assert v not in seen, f"ROADMAP.md has duplicate version entry: {v}"
seen.add(v)