diff options
author | Max Fischer <maxfischer2781@gmail.com> | 2021-06-22 09:54:51 +0200 |
---|---|---|
committer | Max Fischer <maxfischer2781@gmail.com> | 2021-06-22 09:54:51 +0200 |
commit | fa6597590743ee3b26ed8c57e0af2d8698a97699 (patch) | |
tree | fcb0a023bccc1d1375403d59738dc033abb35b5c | |
parent | 1a6bbf974a597c977c54729c61c1f8a2d888f5e5 (diff) | |
download | pyparsing-git-fa6597590743ee3b26ed8c57e0af2d8698a97699.tar.gz |
naive test for existing suite
-rw-r--r-- | tests/test_unit.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py index 6d3f616..c7f602b 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -8067,6 +8067,26 @@ class Test8_WithUnboundedPackrat(Test2_WithoutPackrat): ) +class Test9_WithLeftRecursionParsing(Test2_WithoutPackrat): + """ + rerun Test2 tests, now with unbounded packrat cache + """ + + def setUp(self): + recursion_suite_context.restore() + # TODO: This is a workaround to skip tests not compatible with memoization. + # Should do so explicitly instead of re-using the Packrat flag. + ParserElement._packratEnabled = True + + def tearDown(self): + ParserElement._packratEnabled = False + default_suite_context.restore() + + def test000_assert_packrat_status(self): + print("Left-Recursion enabled:", ParserElement._left_recursion_enabled) + self.assertTrue(ParserElement._left_recursion_enabled, "left recursion not enabled") + + class TestLR1_Recursion(ppt.TestParseResultsAsserts, TestCase): """ Tests for recursive parsing |