"""U3 (upstream 080c286c / eaf6918b): one combustion orb table across the engine. `pancha_mahapurusha` keeps its own copy (upstream shape); it must stay equal to the shared `jyotish_engine.COMBUSTION_ORBS` so the full reading, the consultation graha drishti layer and Pancha Mahapurusha never disagree. """ import sys from pathlib import Path ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(ROOT / 'scripts')) import jyotish_engine # noqa: E402 import pancha_mahapurusha # noqa: E402 def test_pancha_combustion_table_equals_engine_table() -> None: assert pancha_mahapurusha.COMBUSTION_ORB == jyotish_engine.COMBUSTION_ORBS def test_retrograde_orbs_are_used_by_both_helpers() -> None: sun = 100.0 for planet, profile in jyotish_engine.COMBUSTION_ORBS.items(): for retrograde, key in ((False, 'direct'), (True, 'retrograde')): orb = profile[key] inside = sun + orb - 0.01 outside = sun + orb + 0.01 assert jyotish_engine.is_combust(planet, inside, sun, retrograde) is True assert jyotish_engine.is_combust(planet, outside, sun, retrograde) is False assert pancha_mahapurusha._is_combust(planet, inside, sun, retrograde) is True assert pancha_mahapurusha._is_combust(planet, outside, sun, retrograde) is False assert jyotish_engine.is_combust('Sun', sun, sun) is False assert jyotish_engine.combustion_threshold('Rahu') is None