strengthen external parity diagnostics
This commit is contained in:
@@ -7,7 +7,12 @@ def test_scanner_reports_real_divisional_transitions(monkeypatch):
|
||||
if command == "chart":
|
||||
return {"ascendant": {"sign": "Leo", "degree_in_sign": 10 + minute / 100}}
|
||||
ascendant = "Aries" if minute % 2 else "Taurus"
|
||||
return {"divisional_charts": {"D": {"ascendant": ascendant}}}
|
||||
return {
|
||||
"divisional_charts": {
|
||||
"D9_Navamsa": {"ascendant": ascendant},
|
||||
"D10_Dasamsa": {"ascendant": ascendant},
|
||||
}
|
||||
}
|
||||
|
||||
monkeypatch.setattr(scanner, "_engine_json", fake_engine)
|
||||
report = scanner.scan_candidate_times(
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
RUNNER = ROOT / "benchmarks" / "jyotish" / "scripts" / "run_pyjhora_compare.py"
|
||||
|
||||
|
||||
def test_pyjhora_compare_help_is_non_executing():
|
||||
result = subprocess.run(
|
||||
[sys.executable, str(RUNNER), "--help"], cwd=ROOT, capture_output=True, text=True, timeout=15
|
||||
)
|
||||
|
||||
assert result.returncode == 0
|
||||
assert "--build-local" in result.stdout
|
||||
assert "FileNotFoundError" not in result.stderr
|
||||
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.pyjhora_parity_summary import summarize_matrix
|
||||
|
||||
|
||||
def test_summary_marks_partial_verified_when_only_d1_d9_d10_dasha_are_covered(tmp_path: Path):
|
||||
matrix = tmp_path / "matrix.csv"
|
||||
matrix.write_text(
|
||||
"section,status\nascendant,match\nD9,match\nD10,match\ndasha,match\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
result = summarize_matrix(matrix, settings={"ayanamsa": "lahiri", "node_mode": "mean"})
|
||||
|
||||
assert result["status"] == "partial_verified"
|
||||
assert result["full_parity_verified"] is False
|
||||
assert result["missing_required_outputs"] == ["D2", "D4", "Shadbala", "Ashtakavarga"]
|
||||
Reference in New Issue
Block a user