Commit 0c2e5677 authored by Jeremy Sanders's avatar Jeremy Sanders

Update to Veusz 1.21.1

parent 10a8794b
veusz (1.21.1-1) unstable; urgency=low
* Update to Veusz 1.21.1
* Remove arm self test patch
-- Jeremy Sanders <jeremy@jeremysanders.net> Sun, 31 Aug 2014 15:11:00 +0200
veusz (1.20.1-3) unstable; urgency=medium
* Team upload.
......
Description: Fix self test failures on ARM
Origin: upstream, https://github.com/jeremysanders/veusz/commit/96b18186c198ad37350420356fa5cf000332c0bc
Bug: https://github.com/jeremysanders/veusz/issues/58
Author: Jeremy Sanders <jeremy@jeremysanders.net>
diff --git a/tests/runselftest.py b/tests/runselftest.py
index 1ec0944..870710c 100755
--- a/tests/runselftest.py
+++ b/tests/runselftest.py
@@ -233,12 +233,7 @@ def runTests():
oldflt = svg_export.fltStr
def fltStr(v, prec=1):
- # this is to get consistent rounding to get the self test correct... yuck
- # decimal would work, but that drags in loads of code
- # convert float to string with prec decimal places
-
- v = round(v, prec+2)
-
+ """Only output floats to 1 dp."""
return oldflt(v, prec=prec)
if __name__ == '__main__':
diff --git a/veusz/document/svg_export.py b/veusz/document/svg_export.py
index ae343ff..b90dde7 100644
--- a/veusz/document/svg_export.py
+++ b/veusz/document/svg_export.py
@@ -44,6 +44,9 @@ def fltStr(v, prec=2):
"""Change a float to a string, using a maximum number of decimal places
but removing trailing zeros."""
+ # ensures consistent rounding behaviour on different platforms
+ v = round(v, prec+2)
+
val = ('% 20.10f' % v)[:10+prec]
# drop any trailing zeros
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