| Server IP : 185.143.234.130 / Your IP : 185.215.232.195 Web Server : LiteSpeed System : Linux jambul.7ho.st 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : renecafe ( 1327) PHP Version : 8.1.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/pyparsing/__pycache__/ |
Upload File : |
�
��̘_��� �P � d dl mZ d dlZddlmZmZmZmZmZ G d� d� � Z dS )� )�contextmanagerN� )�
ParserElement�ParseException�Keyword�__diag__�
__compat__c �� � e Zd ZdZ G d� d� � Z G d� d� � Ze dd ed
ej e
dej e
ded
edej e dej e defd�� � ZdS )�pyparsing_testzB
namespace class for classes useful in writing unit tests
c �6 � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z dS ) �&pyparsing_test.reset_pyparsing_contexta�
Context manager to be used when writing unit tests that modify pyparsing config values:
- packrat parsing
- bounded recursion parsing
- default whitespace characters.
- default keyword characters
- literal string auto-conversion class
- __diag__ settings
Example::
with reset_pyparsing_context():
# test that literals used to construct a grammar are automatically suppressed
ParserElement.inlineLiteralsUsing(Suppress)
term = Word(alphas) | Word(nums)
group = Group('(' + term[...] + ')')
# assert that the '()' characters are not included in the parsed tokens
self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def'])
# after exiting context manager, literals are converted to Literal expressions again
c � � i | _ d S �N)�
_save_context��selfs �b/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/pyparsing/testing.py�__init__z/pyparsing_test.reset_pyparsing_context.__init__- s � �!#�D���� c �� � t j | j d<