Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 3, 17:00 UTC
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))