feat(est): print annual allocations

This commit is contained in:
2026-11-07 08:49:33 +09:00
parent cffeb84ce4
commit 95c7acb7d4
3 changed files with 34 additions and 0 deletions
+18
View File
@@ -1,6 +1,24 @@
from test_est_rea_parity import run
def test_annual_print_contains_each_stage_and_calculation_errors():
result = run(
"math",
"""(()=>{
const p=EstNative.empty();p.options.SourceRefresh=false;
p.tables.EstMainDat=[{PkID:1,Code:'R',GN:3,GU:100},{LinkIndex:54}];
p.annual=[{name:'first',formula:'[기준]*0.25'},{name:'second',formula:'[기준]-[first]'}];
const q=EstNative.calculate(p), good=EstForms.data('annual-summary',q);
q.annual[0].formula='[unknown]';
return {good,bad:EstForms.data('annual-summary',q)};
})()""",
)
assert [row["directCost"] for row in result["good"]["rows"]] == [75, 225]
assert result["good"]["rows"][1]["formula"] == "[기준]-[first]"
assert result["good"]["errors"] == []
assert result["bad"]["errors"]
def test_progress_and_escalation_print_use_selected_calculations():
result = run(
"math",