🌐 AI搜索 & 代理 主页
Skip to content

Commit 49ed2e0

Browse files
committed
Replace explicit packrat reset in test_unit.py to call disable_memoization instead
1 parent 52586d0 commit 49ed2e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_unit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11272,8 +11272,7 @@ def test_cli_invocation_with_module_flag(self):
1127211272

1127311273

1127411274
# force clear of packrat parsing flags before saving contexts
11275-
pp.ParserElement._packratEnabled = False
11276-
pp.ParserElement._parse = pp.ParserElement._parseNoCache # noqa
11275+
pp.ParserElement.disable_memoization()
1127711276

1127811277
Test02_WithoutPackrat.suite_context = ppt.reset_pyparsing_context().save()
1127911278
Test02_WithoutPackrat.save_suite_context = ppt.reset_pyparsing_context().save()

0 commit comments

Comments
 (0)