north-road / inasafe

InaSAFE - QGIS plugin for estimating impact from natural disasters
www.inasafe.org
GNU General Public License v3.0
0 stars 0 forks source link

Difference in rounding from py2 to py3 #11

Closed elpaso closed 6 years ago

elpaso commented 6 years ago

I'm not sure what to do here, I'll update the test for now, please let me know if we need some more logic to maintain the original behavior: https://github.com/inasafe/inasafe/blob/master/safe/common/test/test_utilities.py#L127

ale@blackhole:~/dev/python/inasafe$ python2 -c 'print int(round(10.5))' 11 ale@blackhole:~/dev/python/inasafe$ python3 -c 'print(int(round(10.5)))' 10

elpaso commented 6 years ago

nevermind: found a workaround http://python3porting.com/differences.html#rounding-behavior