summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2016-09-11 16:19:57 +0000
committerPaul McGuire <ptmcg@austin.rr.com>2016-09-11 16:19:57 +0000
commitec02b784583d971117910ba8b4c51426dfae5885 (patch)
tree802cfe46b272fc655e858c9308b3bb47a187787f
parentcefdaeedb2bcb2761fc264d669c83f8c32adf8b9 (diff)
downloadpyparsing-git-ec02b784583d971117910ba8b4c51426dfae5885.tar.gz
Add tests of sci_real
-rw-r--r--src/unitTests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/unitTests.py b/src/unitTests.py
index b21d1aa..cf2900d 100644
--- a/src/unitTests.py
+++ b/src/unitTests.py
@@ -2863,6 +2863,14 @@ class CommonExpressionsTest(ParseTestCase):
""")[0]
assert success, "error in parsing valid numerics"
+ success = pyparsing_common.sci_real.runTests("""
+ 1e12
+ -1e12
+ 3.14159
+ 6.02e23
+ """)[0]
+ assert success, "error in parsing valid scientific notation reals"
+
# any int or real number, returned as float
success = pyparsing_common.fnumber.runTests("""
100