Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
31 lines
1.3 KiB
Python
31 lines
1.3 KiB
Python
# BUG-2301: the astrologer's tests/test_yoga_saarada_source.py at upstream 58f37ee5b, unchanged except this line.
|
|
import pytest
|
|
from scripts.yoga_engine import ALL_PLANETS, YogaEngine
|
|
|
|
|
|
def run(change=None):
|
|
p = {name: {'house': 2, 'sign': 'Taurus'} for name in ALL_PLANETS}
|
|
p.update(Saturn={'house': 5}, Mercury={'house': 4}, Sun={'house': 5, 'sign': 'Leo'},
|
|
Moon={'house': 12}, Mars={'house': 11}, Jupiter={'house': 8})
|
|
if change:
|
|
planet, data = change
|
|
p[planet] = data
|
|
e = YogaEngine('references/yoga_rules.json')
|
|
e.rules = [r for r in e.rules if r['id'] == 'bvr_saarada_yoga']
|
|
return e.detect(p, 'Aries')
|
|
|
|
|
|
def test_geometry_retained_but_strength_not_invented():
|
|
row = run()[0]
|
|
assert row['formation_status'] == 'incomplete_conditions'
|
|
assert row['formation_evidence']['matched_paths'] == []
|
|
assert row['formation_evidence']['matched_geometry_paths'] == ['five_clause_geometry']
|
|
assert not row['effects']
|
|
|
|
|
|
@pytest.mark.parametrize('change', [('Saturn', {'house': 6}), ('Mercury', {'house': 3}),
|
|
('Sun', {'house': 5, 'sign': 'Cancer'}),
|
|
('Moon', {'house': 11}), ('Mars', {'house': 10})])
|
|
def test_each_clause_required(change):
|
|
assert run(change) == []
|