diff options
| author | Damien George | 2014-10-05 17:50:02 +0100 |
|---|---|---|
| committer | Damien George | 2014-10-05 17:50:02 +0100 |
| commit | c3ab90da466e2c4479c9c1865f4302c9c8bdb8e9 (patch) | |
| tree | 51f96916db47c1a45b6667f70939fdbddaa0610c | |
| parent | d112cbfd7cc262860dfe371490fca3eea1c3481b (diff) | |
tests: Make printing of floats hopefully more portable.
| -rw-r--r-- | tests/extmod/ujson_loads.py | 2 |
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) |
