Fix: tests: print real values in a fixed format
[babeltrace.git] / tests / utils / python / cli_params_to_string.py
index a3d5ff85815a82d4229ceb2fe4c993c93811c7c3..19e47092ac93f7c1fc28098e5072119a8db51c14 100644 (file)
@@ -32,12 +32,13 @@ def to_string(p):
         )
     elif type(p) is bt2._UnsignedIntegerValueConst:
         s = str(p) + 'u'
+    elif type(p) is bt2._RealValueConst:
+        s = '{:.7f}'.format(float(p))
     elif (
         type(p)
         in (
             bt2._StringValueConst,
             bt2._SignedIntegerValueConst,
-            bt2._RealValueConst,
             bt2._BoolValueConst,
         )
         or p is None
This page took 0.032927 seconds and 4 git commands to generate.