summaryrefslogtreecommitdiff
path: root/tests/float/python36.py
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-07-11 16:45:30 -0400
committerDan Halbert <halbert@halwitz.org>2018-07-11 16:45:30 -0400
commit7c219600a246d8956d0b23ea3f5d125a820e6b6a (patch)
tree4cf793a66284322d48a8f430815c31cd1c9ffa1d /tests/float/python36.py
parent4962468ffffac9ec4e36b2b1fc3f132516df3127 (diff)
parent25ae98f07cb3c4488cb955403dfe56b8bb8db6f0 (diff)
WIP: after merge; before testing
Diffstat (limited to 'tests/float/python36.py')
-rw-r--r--tests/float/python36.py10
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'))