fix: address review feedback in test_skills.py

- Remove no-op replace('_', '_') in test_mentions_new_skills
- Add scan_modes and coordination assertions in test_includes_internal_categories
- Add test_frontmatter_has_cwe to TestEdgeCasesSkillContent for parity

Signed-off-by: fresh3nough <251773092+fresh3nough@users.noreply.github.com>
This commit is contained in:
fresh3nough 2026-03-06 17:26:28 +00:00
parent bd242ab192
commit 214813561b
No known key found for this signature in database

View file

@ -199,7 +199,7 @@ class TestGenerateSkillsDescription:
# The description includes a comma-separated list of all skill names.
for skill in NEW_SKILLS:
if skill in all_names:
assert skill.replace("_", "_") in desc
assert skill in desc
# ---------------------------------------------------------------------------
@ -214,6 +214,8 @@ class TestGetAllCategories:
cats = _get_all_categories()
# Should include categories that get_available_skills excludes
assert "vulnerabilities" in cats
assert "scan_modes" in cats, "scan_modes should be returned by _get_all_categories"
assert "coordination" in cats, "coordination should be returned by _get_all_categories"
def test_returns_sorted_skills(self) -> None:
for category, skills in _get_all_categories().items():
@ -297,6 +299,9 @@ class TestEdgeCasesSkillContent:
desc = frontmatter.get("description", "")
assert len(desc) > 10, "Description is too short"
def test_frontmatter_has_cwe(self, frontmatter: dict[str, str]) -> None:
assert "cwe" in frontmatter
def test_required_sections_present(self, raw: str) -> None:
for section in REQUIRED_SECTIONS:
assert f"## {section}" in raw or f"# {section}" in raw, (