Files
Jyotisha/tests/test_budhaditya_combustion_gate.py
T
Jesse_ChenandClaude Opus 5.5 45d6dbf6ca fix: bound Budhaditya yoga under combustion (upstream 994638f0, Budha-Aditya part only)
A combust Mercury keeps the Budha-Aditya formation visible but downgrades it
to conditional. Upstream's other card-gating fields in the same hunk come
from separate commits and are not taken. TASK-upstream-sync5-20261002 U7.

(cherry picked from commit 994638f0)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
2026-10-02 23:40:55 +08:00

30 lines
1.1 KiB
Python

from scripts.yoga_engine import YogaEngine
def test_budhaditya_with_combust_mercury_is_conditional():
engine = YogaEngine('references/yoga_rules.json')
planets = {
'Sun': {'sign': 'Aries', 'house': 1},
'Mercury': {'sign': 'Aries', 'house': 1, 'combust': True},
}
rows = [row for row in engine.detect(planets, 'Aries') if row['rule_id'] == 'budhaditya_yoga']
assert len(rows) == 1
row = rows[0]
assert row['condition_status'] == 'combustion_requires_review'
assert row['effects'] == []
assert row['traditional_effects']
assert row['strength'] == 'conditional'
assert row['combustion_witness']['planet'] == 'Mercury'
def test_budhaditya_without_combustion_keeps_traditional_effects():
engine = YogaEngine('references/yoga_rules.json')
planets = {
'Sun': {'sign': 'Aries', 'house': 1},
'Mercury': {'sign': 'Aries', 'house': 1, 'combust': False},
}
rows = [row for row in engine.detect(planets, 'Aries') if row['rule_id'] == 'budhaditya_yoga']
assert len(rows) == 1
assert rows[0]['effects']
assert 'combustion_witness' not in rows[0]