from pathlib import Path ROOT = Path(__file__).resolve().parents[2] WHITEPAPERS = [ "real-total-cost-forensic-accounting", "trenchless-hdd-ditchwitch-piping-analysis", "spirited-energy-heat-host-master-plan", "undeniable-key-indicators-scoreboard", "steelmanned-spirited-energy-master-plan", ] def test_public_site_has_no_petition_page(): """Petition is retired from the public site; act.html is the action surface.""" assert not (ROOT / "petition.html").exists() for page in ("index.html", "act.html"): html = (ROOT / page).read_text().lower() assert "petition.html" not in html assert "sign the petition" not in html def test_whitepapers_rebuilt_in_report_format(): for name in WHITEPAPERS: html = ROOT / "research" / "dist" / "whitepapers" / f"{name}.html" pdf = ROOT / "research" / "dist" / "pdfs" / f"{name}.pdf" assert html.is_file(), f"missing styled html for {name}" text = html.read_text() assert "Supplementary whitepaper" in text, f"{name} missing series label" assert "--se-green-900" in text, f"{name} not carrying report tokens" assert "895 MW" not in text, f"{name} leaks retired composite" assert pdf.is_file() and pdf.stat().st_size > 30_000, f"pdf missing/thin for {name}"