"""Smoke tests for WP-0015-T07: every real `specs/policies/`/ `specs/profiles/` file must actually render without error. No database or Docker required — this only exercises `reference_docs.py`'s pure file-rendering logic. """ from __future__ import annotations import pytest from conftest import REPO_ROOT pytest.importorskip("markdown") pytest.importorskip("yaml") from target_revenue.service import reference_docs # noqa: E402 POLICY_SLUGS = ["linear-longstop-v0"] PROFILE_SLUGS = [ "development-license", "cost-plus-operations", "phase-sponsorship", "service-with-development-allocation", "product-ideation", "general-consulting", ] def test_all_real_policy_files_exist_on_disk(): for slug in POLICY_SLUGS: assert (REPO_ROOT / "specs" / "policies" / f"{slug}.md").is_file() def test_all_real_profile_files_exist_on_disk(): for slug in PROFILE_SLUGS: assert (REPO_ROOT / "specs" / "profiles" / f"{slug}.md").is_file() @pytest.mark.parametrize("slug", POLICY_SLUGS) def test_policy_doc_renders_without_error(slug): result = reference_docs.load_reference_doc("policies", slug) assert result is not None html, frontmatter = result assert "