|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/lib2to3/tests/__pycache__/ |
U
?��g� � @ s� d Z ddlmZ dZddlmZ ddlZddlZddlZddlm Z dd lm
Z
dd
l
mZ e�� dd� Z
d
d� Zedkr�e
� dS )z,Main program for testing the infrastructure.� )�print_functionz#Guido van Rossum <guido@python.org>� )�supportN� )�pytree)�pgen2)�driverc
C s� t �d�} t j| tjd�}d}|j|dd�}t||�s>td� tj dd � sPd S g }tj
D ]|}tj
| }|d ksZt|d�s|qZ|j}|�
d �r�|d d
� }|�
d�s�qZtd|tjd
� |j|dd�}t||�rZ|�|� qZtjD ]�}zt�|�}W n tk
�r
Y q�Y nX td|dtjd
� |D ]�}|�
d��s6�q"td|tjd
� tj�||�}z|j|dd�}W n2 tjjk
�r� } ztd| � W 5 d } ~ X Y nX t||��r"|�|� �q"q�|�s�td� ntd� |D ]}td|� �q�d S )NzGrammar.txt)�convertz
example.pyT)�debugz No diffs.r �__file__z.pyc���z.pyZParsing)�fileZScanningz...zParseError:zNo problems. Congratulations!zProblems in following files:z***)r Zload_grammarZDriverr r Z
parse_file�diff�print�sys�argv�modules�hasattrr �endswith�stderr�append�path�os�listdir�OSError�joinr �parseZ
ParseError)
ZgrZdr�fn�treeZproblems�name�mod�dir�names�err� r$ �?/opt/cppython/lib/python3.8/lib2to3/tests/pytree_idempotency.py�main sX
r&