@davoodmehraban89 / Aram / commits / 5679a2e
Fork 0

test(decimal): compare small exact amounts numerically not by decimal notation

davoodmehraban89 committed Oct 31, 2026 at 06:49 UTC 5679a2e9feff582b0d0b74bd5a807387879bb358
1 file changed +1 -1
backend/tests/test_income_statement_candidate.py
+1 -1
@@ -283,7 +283,7 @@ def test_tiny_exact_decimal_is_not_rounded_away():
283 refs=references(costs=small),
284 )
285 assert result.eligible_for_analyst_review
286 - assert result.cost_of_revenue_total == small
286 + assert Decimal(result.cost_of_revenue_total) == Decimal(small)
287 with localcontext() as context:
288 context.prec = 400
289 expected = str(Decimal("155") - Decimal(small))