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

Commit 52586d0

Browse files
committed
Clear debug flags on all pyparsing builtin expressions when restoring pyparsing test context
1 parent 8228029 commit 52586d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyparsing/testing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
__diag__,
1414
__compat__,
1515
)
16+
from . import core_builtin_exprs
1617

1718

1819
class pyparsing_test:
@@ -122,6 +123,10 @@ def restore(self):
122123
"recursion_enabled"
123124
]
124125

126+
# clear debug flags on all builtins
127+
for expr in core_builtin_exprs:
128+
expr.set_debug(False)
129+
125130
__compat__.collect_all_And_tokens = self._save_context["__compat__"]
126131

127132
return self

0 commit comments

Comments
 (0)