Your IP : 216.73.216.213


Current Path : /opt/alt/python36/lib64/python3.6/lib2to3/tests/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/lib2to3/tests/__pycache__/pytree_idempotency.cpython-36.pyc

3

� f�	�@s�dZddlmZdZddlmZddlZddlZddlZddlm	Z	dd	lm
Z
dd
l
mZej�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
Cs�tjd�}tj|tjd�}d}|j|dd�}t||�s>td�tj	dd�sPdSg}x�tj
D]~}tj
|}|dks\t|d�r�q\|j}|j
d	�r�|dd�}|j
d
�s�q\td|tjd�|j|dd�}t||�r\|j|�q\Wx�tjD]�}ytj|�}Wntk
�rw�YnXtd
|dtjd�x�|D]�}|j
d
��s>�q*td|tjd�tjj||�}y|j|dd�}Wn2tjjk
�r�}	ztd|	�WYdd}	~	XnXt||��r*|j|��q*Wq�W|�s�td�n"td�x|D]}td|��q�WdS)NzGrammar.txt)�convertz
example.pyT)�debugz	No diffs.r�__file__z.pycz.pyZParsing)�fileZScanningz...zParseError:zNo problems.  Congratulations!zProblems in following files:z***���)rZload_grammarZDriverrr	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$�E/opt/alt/python36/lib64/python3.6/lib2to3/tests/pytree_idempotency.py�mainsX








r&cCsHtdd�}z|jt|��Wd|j�Xztjd|�Stjd�XdS)N�@�wzdiff -u %s @)�open�write�str�closer�system�remove)rr�fr$r$r%rRs

r�__main__)�__doc__Z
__future__r�
__author__�rrrZloggingrrrZbasicConfigr&r�__name__r$r$r$r%�<module>s8