From 3f9f918c93a92350c76a761af85abf003737fc30 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 29 Feb 2020 09:24:00 +0100 Subject: Fix function approx and its testcase Function was moved and changed by commit 0f8643954fd9507aec85bab46046e71a497bfffe, but the testcase was not. --- lulua/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lulua/report.py') diff --git a/lulua/report.py b/lulua/report.py index 200bb9b..b6c6f7e 100644 --- a/lulua/report.py +++ b/lulua/report.py @@ -14,7 +14,7 @@ def approx (i): units = ['', 'thousand', 'million', 'billion'] base = Decimal (1000) i = Decimal (i) - while i >= base and len (units) > 1: + while round (i, 1) >= base and len (units) > 1: i /= base units.pop (0) return round (i, 1), units[0] -- cgit v1.2.3