diff --git a/tests/extmod/ujson_loads.py b/tests/extmod/ujson_loads.py
index <HASH>..<HASH> 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)
tests: Make printing of floats hopefully more portable.