Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
43 lines
2.0 KiB
Python
43 lines
2.0 KiB
Python
# BUG-2301: the astrologer's tests/test_yoga_kalpadruma_source.py at upstream 58f37ee5b, unchanged except this line.
|
||
"""Independent named-chain replay of PVR pp139–140, not event calibration."""
|
||
from pathlib import Path
|
||
from scripts.yoga_engine import YogaEngine
|
||
|
||
|
||
def engine():
|
||
e = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json'))
|
||
e.rules = [r for r in e.rules if r['id'] == 'bvr_kalpadruma_yoga']
|
||
return e
|
||
|
||
|
||
def test_pvr_shivaji_named_chain_uses_second_members_navamsa():
|
||
# Only placements explicitly used by the source explanation. Not a
|
||
# reconstructed birth chart or a historical-outcome accuracy claim.
|
||
natal = {'Sun': {'sign': 'Aquarius', 'house': 7},
|
||
'Saturn': {'sign': 'Libra', 'house': 3},
|
||
'Venus': {'sign': 'Sagittarius', 'house': 5}}
|
||
row, = engine().detect(natal, 'Leo', context={'chart_type': 'D1',
|
||
'd9': {'planets': {'Saturn': {'sign': 'Aquarius'}}}})
|
||
assert row['formation_status'] == 'conditions_met'
|
||
assert set(row['planets']) == {'Sun', 'Saturn', 'Venus'}
|
||
assert row['evidence_dependencies']['independent_confirmation_count'] is None
|
||
|
||
|
||
def test_wrong_third_member_navamsa_cannot_rescue_failed_fourth_member():
|
||
natal = {'Sun': {'sign': 'Aquarius', 'house': 7},
|
||
'Saturn': {'sign': 'Libra', 'house': 3},
|
||
'Venus': {'sign': 'Sagittarius', 'house': 5},
|
||
'Mercury': {'sign': 'Cancer', 'house': 12}}
|
||
assert engine().detect(natal, 'Leo', context={'chart_type': 'D1', 'd9': {'planets': {
|
||
'Saturn': {'sign': 'Gemini'}, 'Venus': {'sign': 'Aquarius'}}}}) == []
|
||
|
||
|
||
def test_missing_required_navamsa_is_not_known_absence():
|
||
natal = {'Sun': {'sign': 'Aquarius', 'house': 7},
|
||
'Saturn': {'sign': 'Libra', 'house': 3},
|
||
'Venus': {'sign': 'Sagittarius', 'house': 5}}
|
||
row, = engine().detect(natal, 'Leo', context={'chart_type': 'D1'})
|
||
assert row['formation_status'] == 'incomplete_conditions'
|
||
assert 'Saturn.D9_sign' in row['missing_inputs']
|
||
assert not row['effects']
|