feat(est): print annual allocations
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user