@davoodmehraban89 / Aram-2 Mirror · read-only / commits / 6fff0b4
Fork 0

Mirrored from https://github.com/davoodmehraban89/Aram.git

Synced Dec 3, 20:45 UTC

test(decimal): propagate all-zero coverage regression across dependent drafts

davoodmehraban89 committed Oct 31, 2026 at 00:37 UTC 6fff0b44a12360ac91e0108552c692f165285049
1 file changed +14
backend/tests/test_coverage_preview.py
+14
@@ -191,3 +191,17 @@ def test_hidden_unknown_extra_sheet_is_not_silently_ignored():
191 with pytest.raises(CoverageError) as exc:
192 preview(content)
193 assert exc.value.code == "HIDDEN_INPUT"
194 +
195 +
196 +def test_all_zero_accounts_do_not_crash_decimal_aggregation():
197 + def zero_accounts(book):
198 + for row in book["Accounts"].iter_rows(min_row=2):
199 + row[16].value = "0" # opening
200 + row[19].value = "0" # closing
201 +
202 + result = preview(make_change(sample_workbook(), zero_accounts))
203 + assert result.source_closing_exposure == "0"
204 + assert result.candidate_closing_exposure == "0"
205 + assert result.blocked_closing_exposure == "0"
206 + assert result.blocked_accounts == 1
207 + assert not result.financial_statement