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>
79 lines
2.8 KiB
Python
79 lines
2.8 KiB
Python
"""Source-bounded regression tests for Dwadashottari MD."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from datetime import datetime
|
|
from pathlib import Path
|
|
|
|
from scripts.dwadashottari_dasha import calculate_dwadashottari_dasha, dwadashottari_applicability
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_dwadashottari_requires_explicit_sukramsaka_profile() -> None:
|
|
result = calculate_dwadashottari_dasha({
|
|
"birth_datetime": "2000-01-01T12:00:00",
|
|
"moon_longitude": 350.0,
|
|
})
|
|
|
|
assert result["execution_status"] == "blocked"
|
|
assert "sukramsaka_profile" in result["reason"]
|
|
|
|
|
|
def test_dwadashottari_supports_three_documented_sukramsaka_profiles() -> None:
|
|
simple = dwadashottari_applicability({
|
|
"sukramsaka_profile": "navamsa_lagna_taurus_or_libra",
|
|
"navamsa_ascendant_sign_index": 1,
|
|
})
|
|
venus_rasi = dwadashottari_applicability({
|
|
"sukramsaka_profile": "lagna_navamsa_matches_venus_rasi",
|
|
"navamsa_ascendant_sign_index": 6,
|
|
"venus_rasi_sign_index": 6,
|
|
})
|
|
venus_navamsa = dwadashottari_applicability({
|
|
"sukramsaka_profile": "lagna_rasi_matches_venus_navamsa",
|
|
"ascendant_sign_index": 8,
|
|
"venus_navamsa_sign_index": 8,
|
|
})
|
|
|
|
assert simple["applicable"] is True
|
|
assert venus_rasi["applicable"] is True
|
|
assert venus_navamsa["applicable"] is True
|
|
|
|
|
|
def test_dwadashottari_emits_md_for_selected_profile_without_child_boundaries() -> None:
|
|
result = calculate_dwadashottari_dasha({
|
|
"birth_datetime": datetime(2000, 1, 1, 12, 0),
|
|
"moon_longitude": 350.0,
|
|
"sukramsaka_profile": "navamsa_lagna_taurus_or_libra",
|
|
"navamsa_ascendant_sign_index": 1,
|
|
})
|
|
|
|
assert result["execution_status"] == "executed"
|
|
assert result["confidence_status"] == "parameter_sensitive"
|
|
assert result["total_cycle"] == 112
|
|
assert len(result["major"]) == 8
|
|
assert result["starting_lord"] == "Sun" # Revati counts as remainder 1.
|
|
assert result["major"][0]["full_years"] == 7
|
|
assert result["major"][1]["lord"] == "Jupiter"
|
|
assert result["period_depth_status"] == "mahadasha_executed_ad_pd_blocked_pending_row_level_replay"
|
|
assert "antardasha" not in result["major"][0]
|
|
|
|
|
|
def test_dwadashottari_standard_table_profile_preserves_unmet_gate_but_emits_rows() -> None:
|
|
result = calculate_dwadashottari_dasha({
|
|
"birth_datetime": "2000-01-01T12:00:00",
|
|
"moon_longitude": 350.0,
|
|
"sukramsaka_profile": "navamsa_lagna_taurus_or_libra",
|
|
"navamsa_ascendant_sign_index": 2,
|
|
"standard_table_profile": "pl9_reports_all_dasha_tables_v1",
|
|
})
|
|
|
|
assert result["execution_status"] == "executed"
|
|
assert result["classical_applicable"] is False
|
|
assert result["standard_table_profile"] == "pl9_reports_all_dasha_tables_v1"
|
|
assert len(result["major"]) == 8
|
|
|