"""微信 Hook 128 action 静态三方对齐 — CI 门禁(不依赖真机)""" from __future__ import annotations import subprocess import sys from pathlib import Path ROOT = Path(__file__).resolve().parents[2] AUDIT = ROOT / "sdk/scripts/wechat_interface_audit.py" def test_wechat_interface_static_alignment(): proc = subprocess.run( [sys.executable, str(AUDIT)], cwd=str(ROOT), capture_output=True, text=True, timeout=30, ) assert proc.returncode == 0, proc.stdout + proc.stderr assert "完整对齐: ✅" in proc.stdout assert "WECHAT_ACTIONS: 159" in proc.stdout assert "缺失 RPC: 0" in proc.stdout