tests: Make printing of floats hopefully more portable.

This commit is contained in:
Damien George 2014-10-05 17:50:02 +01:00
parent d112cbfd7c
commit c3ab90da46
1 changed files with 2 additions and 0 deletions

View File

@ -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)