Your IP : 216.73.216.85


Current Path : /opt/alt/python35/lib64/python3.5/lib2to3/tests/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/lib2to3/tests/__pycache__/pytree_idempotency.cpython-35.pyc



��Yf�	�@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|dtj�}d}|j|dd�}t||�s[td�tj	dd�srdSg}x�tj
D]�}tj
|}|dks�t|d�r�q�|j}|j
d	�r�|dd�}|j
d
�s�q�td|dtj�|j|dd�}t||�r�|j|�q�WxtjD]}ytj|�}Wntk
rswCYnXtd
|ddtj�x�|D]�}|j
d
�s�q�td|dtj�tjj||�}y|j|dd�}Wn8tjjk
r*}	ztd|	�WYdd}	~	Xq�Xt||�r�|j|�q�WqCW|sbtd�n(td�x|D]}td|�qsWdS)NzGrammar.txt�convertz
example.py�debugTz	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/python35/lib64/python3.5/lib2to3/tests/pytree_idempotency.py�mainsX

	

 


r&cCs^tdd�}z|jt|��Wd|j�Xztjd|�SWdtjd�XdS)N�@�wzdiff -u %s @)�open�write�str�closer�system�remove)rr�fr$r$r%rRsr�__main__)�__doc__Z
__future__r�
__author__�rrrZloggingrrrZbasicConfigr&r�__name__r$r$r$r%�<module>s
8