Commit f5e34bc6 authored by Jérome Perrin's avatar Jérome Perrin

use repr to have a more precise float display. Divergences due to float

rounding problem are understandable this way


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25130 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b632090c
......@@ -77,7 +77,10 @@ class QuantityDivergenceTester(PropertyDivergenceTester):
divergence_scope='quantity',
simulation_movement = simulation_movement,
decision_value = d_quantity ,
# use repr to have more precise float display
decision_title = repr(d_quantity),
prevision_value = quantity,
prevision_title = repr(quantity),
tested_property='quantity',
message='Quantity',
)
......@@ -97,6 +100,7 @@ class QuantityDivergenceTester(PropertyDivergenceTester):
if delivery_ratio is not None:
d_quantity *= delivery_ratio
message.decision_value = d_quantity
message.decision_title = repr(d_quantity)
if delivery_ratio == 0 and quantity > 0:
return [message]
if d_quantity != quantity + d_error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment