diff options
Diffstat (limited to 'examples/parsePythonValue.py')
-rw-r--r-- | examples/parsePythonValue.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/examples/parsePythonValue.py b/examples/parsePythonValue.py index 47f9102..4f73bfe 100644 --- a/examples/parsePythonValue.py +++ b/examples/parsePythonValue.py @@ -56,14 +56,16 @@ dictStr <<= ( ) dictStr.setParseAction(cvtDict) -tests = """['a', 100, ('A', [101,102]), 3.14, [ +2.718, 'xyzzy', -1.414] ] - [{0: [2], 1: []}, {0: [], 1: [], 2: []}, {0: [1, 2]}] - { 'A':1, 'B':2, 'C': {'a': 1.2, 'b': 3.4} } - 3.14159 - 42 - 6.02E23 - 6.02e+023 - 1.0e-7 - 'a quoted string'""" +if __name__ == "__main__": -listItem.runTests(tests) + tests = """['a', 100, ('A', [101,102]), 3.14, [ +2.718, 'xyzzy', -1.414] ] + [{0: [2], 1: []}, {0: [], 1: [], 2: []}, {0: [1, 2]}] + { 'A':1, 'B':2, 'C': {'a': 1.2, 'b': 3.4} } + 3.14159 + 42 + 6.02E23 + 6.02e+023 + 1.0e-7 + 'a quoted string'""" + + listItem.runTests(tests) |