summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/json_loads_float.py
blob: 2a8402dc6a2131e9a11beedb5a39143b37d39438 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
try:
    import json
except ImportError:
    print("SKIP")
    raise SystemExit


def my_print(o):
    print("%.3f" % o)


my_print(json.loads("1.2"))
my_print(json.loads("1e2"))
my_print(json.loads("-2.3"))
my_print(json.loads("-2e3"))
my_print(json.loads("-2e+3"))
my_print(json.loads("-2e-3"))