Venus/Jupiter/Moon periods no longer collapse into one marriage-opportunity line. Full reading reports the ten BPHS conditional dasha families; Skill 6.9.16. Co-authored-by: Cursor <cursoragent@cursor.com>
62 lines
2.1 KiB
Python
62 lines
2.1 KiB
Python
"""Source-bounded regression tests for Shattrimshatsama MD."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from datetime import datetime
|
|
from pathlib import Path
|
|
|
|
from scripts.shattrimshatsama_dasha import (
|
|
calculate_shattrimshatsama_dasha,
|
|
shattrimshatsama_applicability,
|
|
)
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_shattrimshatsama_accepts_day_sun_hora_or_night_moon_hora() -> None:
|
|
day = shattrimshatsama_applicability(birth_is_daytime=True, ascendant_hora_lord="Sun")
|
|
night = shattrimshatsama_applicability(birth_is_daytime=False, ascendant_hora_lord="Moon")
|
|
|
|
assert day["applicable"] is True
|
|
assert night["applicable"] is True
|
|
|
|
|
|
def test_shattrimshatsama_rejects_crossed_day_night_hora_conditions() -> None:
|
|
day = shattrimshatsama_applicability(birth_is_daytime=True, ascendant_hora_lord="Moon")
|
|
night = shattrimshatsama_applicability(birth_is_daytime=False, ascendant_hora_lord="Sun")
|
|
|
|
assert day["applicable"] is False
|
|
assert night["applicable"] is False
|
|
|
|
|
|
def test_shattrimshatsama_blocks_without_explicit_hora_inputs() -> None:
|
|
result = calculate_shattrimshatsama_dasha({
|
|
"birth_datetime": "2000-01-01T00:00:00",
|
|
"moon_longitude": 281.0,
|
|
})
|
|
|
|
assert result["execution_status"] == "blocked"
|
|
assert "birth_is_daytime" in result["reason"]
|
|
assert "ascendant_hora_lord" in result["reason"]
|
|
|
|
|
|
def test_shattrimshatsama_emits_only_source_bounded_md() -> None:
|
|
result = calculate_shattrimshatsama_dasha({
|
|
"birth_datetime": datetime(2000, 1, 1, 12, 0),
|
|
"birth_is_daytime": True,
|
|
"ascendant_hora_lord": "Sun",
|
|
"moon_longitude": 281.0,
|
|
})
|
|
|
|
assert result["execution_status"] == "executed"
|
|
assert result["confidence_status"] == "parameter_sensitive"
|
|
assert result["total_cycle"] == 36
|
|
assert result["starting_lord"] == "Moon" # Sravana is the seed.
|
|
assert result["major"][0]["start_date"] == "2000-01-01T12:00:00"
|
|
assert result["major"][0]["years"] < 1.0
|
|
assert result["period_depth_status"] == "mahadasha_executed_ad_pd_blocked_pending_row_level_replay"
|
|
assert "antardasha" not in result["major"][0]
|
|
|