Correctly round when calculating the deviation
authorJoachim Breitner <mail@joachim-breitner.de>
Thu, 17 Jul 2014 11:03:09 +0000 (13:03 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Thu, 17 Jul 2014 11:03:09 +0000 (13:03 +0200)
testsuite/driver/testlib.py

index 091a1ea..126c8e4 100644 (file)
@@ -1045,7 +1045,7 @@ def checkStats(name, way, stats_file, range_fields):
             lowerBound = trunc(           expected * ((100 - float(dev))/100))
             upperBound = trunc(0.5 + ceil(expected * ((100 + float(dev))/100)))
 
-            deviation = round(((val * 100)/ expected) - 100, 1)
+            deviation = round(((float(val) * 100)/ expected) - 100, 1)
 
             if val < lowerBound:
                 print field, 'value is too low:'