ui: fix configwith doctest
4.2 cannot be expressed with IEEE floating point losslessly, and could
cause test failure on some platform:
File ".../mercurial/ui.py", line 414, in mercurial.ui.ui.configwith
Failed example:
u.configwith(float, s, 'float2')
Expected:
-4.2
Got:
-4.
2000000000000002
This patch fixes that by changing the number to 4.25, which can be expressed
by the binary number 100.01.
--- a/mercurial/ui.py Tue Feb 14 01:52:16 2017 +0530
+++ b/mercurial/ui.py Mon Feb 13 21:00:50 2017 -0800
@@ -410,9 +410,9 @@
>>> u.setconfig(s, 'float1', '42')
>>> u.configwith(float, s, 'float1')
42.0
- >>> u.setconfig(s, 'float2', '-4.2')
+ >>> u.setconfig(s, 'float2', '-4.25')
>>> u.configwith(float, s, 'float2')
- -4.2
+ -4.25
>>> u.configwith(float, s, 'unknown', 7)
7
>>> u.setconfig(s, 'invalid', 'somevalue')