403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.109
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_asdl_parser.cpython-36.pyc
3

�w2_��@s�dZddlZddlZddlmZddlZddlZddlZej	�sJej
d��eeee���Zej
jed�ZGdd�dej�Zedkr�ej�dS)	z+Tests for the asdl parser in Parser/asdl.py�N)�dirnamez'test irrelevant for an installed PythonZParserc@s\eZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�ZdS)�TestAsdlParsercCsbtjjdt�tjjdtjjtd��}|j	�|_
|j
jtjjtd��|_|j
|j
j|j�d�dS)Nr�asdlzasdl.pyzPython.asdlzModule validation failed)�sys�path�insert�
parser_dir�	importlib�	machinery�SourceFileLoader�os�join�load_moduler�parse�mod�
assertTrueZcheck)�cls�loader�r�:/opt/alt/python36/lib64/python3.6/test/test_asdl_parser.py�
setUpClasss
zTestAsdlParser.setUpClasscCstjd=dS)Nr)rr)rrrr�
tearDownClass!szTestAsdlParser.tearDownClasscCstj|_tj|_|jj|_dS)N)rrr�types)�selfrrr�setUp%szTestAsdlParser.setUpcCs>|j|jjd�|jd|j�|jd|j�|jd|j�dS)N�Python�stmt�exprr)�assertEqualr�nameZassertInr)rrrr�test_module+szTestAsdlParser.test_modulecCsb|jj}|j|d|jj�|j|dj|jj�|j|jd|jj�|j|jd|jj�dS)NrZwithitem�alias)	r�dfns�assertIsInstancerZType�valueZSumrZProduct)rZdefsrrr�test_definitions1s
zTestAsdlParser.test_definitionscCs|jd}|jt|�d�dS)Nr!zGProduct([Field(identifier, name), Field(identifier, asname, opt=True)]))rr�str)rr!rrr�test_product9s
zTestAsdlParser.test_productcCsL|jd}|jt|j�d�|jt|jd�d�|jt|jd�d�dS)Nr�rzField(int, lineno)�zField(int, col_offset))rr�len�
attributesr&)rrrrr�test_attributes?s
zTestAsdlParser.test_attributescCs|jd}|jt|j�d�|jt|j�d�|jd}|j||jj�|jt|j�d�|jd}|j|jd�|j|j	d�|j
|j�|jd}|j|jd�|j|j	d	�|j
|j�|jd}|j|jd
�|j|j	d�|j|j�|j
|j
�dS)NZ
excepthandlerr)r(r�r�typeZ
identifierrrZbody)rrr*r+r#rZConstructor�fieldsr.rrZoptZassertFalse�seq)rZehandler�consZf0�f1�f2rrr�test_constructor_fieldsEs&




z&TestAsdlParser.test_constructor_fieldscCsBGdd�d|jj�}|�}|j|jd�|j|jdddg�dS)Ncs<eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Z�ZS)z2TestAsdlParser.test_visitor.<locals>.CustomVisitorcst�j�g|_dS)N)�super�__init__�names_with_seq)r)�	__class__rrr6`s
z;TestAsdlParser.test_visitor.<locals>.CustomVisitor.__init__cSsx|jD]}|j|�qWdS)N)r"�visit)rrZdfnrrr�visitModuledsz>TestAsdlParser.test_visitor.<locals>.CustomVisitor.visitModulecSs|j|j�dS)N)r9r$)rr.rrr�	visitTypehsz<TestAsdlParser.test_visitor.<locals>.CustomVisitor.visitTypecSsx|jD]}|j|�qWdS)N)rr9)r�sum�trrr�visitSumksz;TestAsdlParser.test_visitor.<locals>.CustomVisitor.visitSumcSs(x"|jD]}|jr|jj|j�qWdS)N)r/r0r7�appendr)rr1�frrr�visitConstructoroszCTestAsdlParser.test_visitor.<locals>.CustomVisitor.visitConstructor)	�__name__�
__module__�__qualname__r6r:r;r>rA�
__classcell__rr)r8r�
CustomVisitor_s
rFrZModuleZInteractiveZSuite)rZVisitorBaser9rrr7)rrF�vrrr�test_visitor^szTestAsdlParser.test_visitorN)
rBrCrD�classmethodrrrr r%r'r,r4rHrrrrrs
r�__main__)�__doc__�importlib.machineryr	rZos.pathrr�	sysconfigZunittest�is_python_buildZSkipTest�__file__Zsrc_baserr
rZTestCaserrB�mainrrrr�<module>s
f

Youez - 2016 - github.com/yon3zu
LinuXploit