aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George2014-10-05 17:50:02 +0100
committerDamien George2014-10-05 17:50:02 +0100
commitc3ab90da466e2c4479c9c1865f4302c9c8bdb8e9 (patch)
tree51f96916db47c1a45b6667f70939fdbddaa0610c
parentd112cbfd7cc262860dfe371490fca3eea1c3481b (diff)
tests: Make printing of floats hopefully more portable.
-rw-r--r--tests/extmod/ujson_loads.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/extmod/ujson_loads.py b/tests/extmod/ujson_loads.py
index e064a4c9d..187917f82 100644
--- a/tests/extmod/ujson_loads.py
+++ b/tests/extmod/ujson_loads.py
@@ -6,6 +6,8 @@ except:
def my_print(o):
if isinstance(o, dict):
print('sorted dict', sorted(o.items()))
+ elif isinstance(o, float):
+ print('%.3f' % o)
else:
print(o)