diff options
author | ptmcg <ptmcg@austin.rr.com> | 2019-01-09 17:41:14 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2019-01-09 17:41:14 -0600 |
commit | b600b54e06a6a99e90634128d37b7edb15cb367f (patch) | |
tree | 2e91750092c4a4187df254e9aff08052da55e9a2 /unitTests.py | |
parent | 17aeb190d87186e769ddea8752099d841421faab (diff) | |
download | pyparsing-git-b600b54e06a6a99e90634128d37b7edb15cb367f.tar.gz |
Disable explain() tests if running in Py2
Diffstat (limited to 'unitTests.py')
-rw-r--r-- | unitTests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unitTests.py b/unitTests.py index 6293673..14cfe22 100644 --- a/unitTests.py +++ b/unitTests.py @@ -3870,6 +3870,10 @@ class ParseResultsWithNameOr(ParseTestCase): class EmptyDictDoesNotRaiseException(ParseTestCase): def runTest(self): + if not PY_3: + print('explain() not supported in Py2') + return + import pyparsing as pp key = pp.Word(pp.alphas) @@ -3891,6 +3895,10 @@ class EmptyDictDoesNotRaiseException(ParseTestCase): class ExplainExceptionTest(ParseTestCase): def runTest(self): + if not PY_3: + print('explain() not supported in Py2') + return + import pyparsing as pp expr = pp.Word(pp.nums).setName("int") + pp.Word(pp.alphas).setName("word") |