diff options
author | ptmcg <ptmcg@austin.rr.com> | 2018-09-19 20:00:19 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2018-09-19 20:00:19 -0500 |
commit | 5b88bc6fe1c62fec42090155126cf6e193a3f9e1 (patch) | |
tree | 968ff58a491a27cc74abb512651337c0f2f34d8a /simple_unit_tests.py | |
parent | 4dce0936aec1494076b8bb7f87f894e52bffe04d (diff) | |
download | pyparsing-git-5b88bc6fe1c62fec42090155126cf6e193a3f9e1.tar.gz |
simple_unit_tests.py only runs on Py3
Diffstat (limited to 'simple_unit_tests.py')
-rw-r--r-- | simple_unit_tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/simple_unit_tests.py b/simple_unit_tests.py index d2795b5..a1a4572 100644 --- a/simple_unit_tests.py +++ b/simple_unit_tests.py @@ -157,4 +157,9 @@ class TestParseAction(PyparsingExpressionTestCase): if __name__ == '__main__': + # we use unittest features that are in Py3 only, bail out if run on Py2 + import sys + if sys.version_info[0] < 3: + sys.exit(0) + unittest.main()
\ No newline at end of file |