diff options
| author | hathach <thach@tinyusb.org> | 2018-08-01 00:58:23 +0700 |
|---|---|---|
| committer | hathach <thach@tinyusb.org> | 2018-08-01 00:58:23 +0700 |
| commit | 1e524f1b9800b4d734e0c3db0fb6434176c4d7a8 (patch) | |
| tree | 06a6ffe912cb65d1bb78974d35f6b9eba3800c2a /tests/float/python36.py | |
| parent | 20c25f61d92cfde9f259ee06ee47915e7a3ea3c5 (diff) | |
| parent | bf033123a7fa75394fd7a01d17ec99afd9abe645 (diff) | |
Merge branch 'master' into nrf52840_usb_hid
Diffstat (limited to 'tests/float/python36.py')
| -rw-r--r-- | tests/float/python36.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/float/python36.py b/tests/float/python36.py new file mode 100644 index 000000000..6e8fb1f21 --- /dev/null +++ b/tests/float/python36.py @@ -0,0 +1,10 @@ +# tests for things that only Python 3.6 supports, needing floats + +# underscores in numeric literals +print(1_000.1_8) +print('%.2g' % 1e1_2) + +# underscore supported by int/float constructors +print(float('1_2_3')) +print(float('1_2_3.4')) +print('%.2g' % float('1e1_3')) |
