diff options
author | Paul McGuire <ptmcg@users.noreply.github.com> | 2021-08-05 02:26:43 -0500 |
---|---|---|
committer | Paul McGuire <ptmcg@users.noreply.github.com> | 2021-08-05 02:26:43 -0500 |
commit | e8a9ed527215697b2337ca86500fb1325873143a (patch) | |
tree | dcf40b1d4ed86ed3077263e6017709f25d931bdb | |
parent | d108a29db062c9250f50c978e3a86381d1b0746b (diff) | |
download | pyparsing-git-pyjion_testing.tar.gz |
Add testing pass with Pyjion enabledpyjion_testing
-rw-r--r-- | tests/test_unit.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py index 09ad6a4..9f773d5 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -6572,6 +6572,7 @@ class Test2_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): data, [["A", [100, 101, 102]], ["B", [["b", [200, 201]]]], ["C", [300]]], ) + print("searchString test complete") def testInvalidDiagSetting(self): with self.assertRaises( @@ -8067,6 +8068,22 @@ class Test8_WithUnboundedPackrat(Test2_WithoutPackrat): ) +class Test2a_WithPyjion(Test2_WithoutPackrat): + """ + rerun Test2 tests, using pyjion JIT + """ + + def test000_enable_pyjion(self): + # test pyjion compatibility + try: + import pyjion + except ImportError: + pyjion = None + else: + print("Pyjion enabled (version {})".format(pyjion.__version__)) + pyjion.enable() + + # force clear of packrat parsing flags before saving contexts pp.ParserElement._packratEnabled = False pp.ParserElement._parse = pp.ParserElement._parseNoCache |