Files
Jyotisha/tests/test_skill_release_manifest.py
2026-07-16 23:29:48 +08:00

34 lines
1.6 KiB
Python

from __future__ import annotations
import json
from scripts.skill_release_manifest import build_report
def test_skill_release_manifest_defines_basic_and_premium_boundaries() -> None:
report = build_report()
editions = report["editions"]
assert report["scope"] == "skill_release_manifest"
assert set(editions) == {"basic_git", "premium_cloud_drive"}
assert editions["basic_git"]["distribution"] == "public_git_repository"
assert editions["premium_cloud_drive"]["distribution"] == "cloud_drive_zip"
assert "https://github.com/732642856/yinduzhanxing" in editions["basic_git"]["source"]
assert any("scripts/user_invocation_acceptance_check.py" in command for command in report["acceptance_commands"])
assert any("scripts/public_release_privacy_scan.py" in command for command in report["acceptance_commands"])
assert report["privacy_boundary"]["private_birth_data_allowed"] is False
assert "personal_case_reports" in report["privacy_boundary"]["excluded_material"]
assert report["external_engine_boundary"]["PyJHora/JHora"]["runtime_dependency"] is False
assert report["external_engine_boundary"]["JHora desktop"]["runtime_dependency"] is False
assert "official_raw_response" in report["external_engine_boundary"]["VedAstro"]["completion_gate"]
def test_skill_release_manifest_contains_no_private_birth_data() -> None:
text = json.dumps(build_report(), ensure_ascii=False)
private_date = "-".join(["1990", "04", "17"])
private_time = "14" + "" + "49"
private_place = "第四" + "人民医院"
for forbidden in (private_date, private_time, private_place):
assert forbidden not in text