diff --git a/tests/test_curse_yoga_claim_boundary.py b/tests/test_curse_yoga_claim_boundary.py new file mode 100644 index 00000000..a363329d --- /dev/null +++ b/tests/test_curse_yoga_claim_boundary.py @@ -0,0 +1,15 @@ +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] + + +def test_curse_yoga_meanings_do_not_make_deterministic_death_claims() -> None: + sources = [ + ROOT / 'scripts' / 'curse_yoga_detector.py', + ROOT / 'scripts' / 'rashi_tulya_navamsa.py', + ] + text = '\n'.join(path.read_text(encoding='utf-8') for path in sources) + forbidden = ('过早死亡风险', '过早死亡的风险', '可触发危险疾病或事故') + assert all(token not in text for token in forbidden) + assert '不能据此断定死亡' in text