Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/lib2to3/tests/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/lib2to3/tests/__pycache__/support.cpython-34.pyo

�
j f��@sBdZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZej
je�Zej
jej
jed��Zej
jedd�Zeje�Zejede	j�Zd	d
�Zdddd�Zd
d�Zddddd�Zdd�ZejZdS)z Support code for test_*.py files�N)�dedent)�pytree�refactor)�driverz..zGrammar.txt�convertcCstjt|�dd�S)N�debugT)r�parse_string�reformat)�string�r�:/opt/alt/python34/lib64/python3.4/lib2to3/tests/support.pyrsrcCsA|dkr$tj�j|�}ntjdd�j|�dS)N�	verbosity�)�unittestZ
TestLoaderZloadTestsFromModuleZTextTestRunnerZrun)Ztest_modZtestsrrr�
run_all_testssrcCst|�dS)Nz

)r)r
rrrr	sr	�lib2to3cs]|dk	r(�fdd�|D�}ntj�d�}|pDi}tj||dd�S)a

    A convenience function for creating a RefactoringTool for tests.

    fixers is a list of fixers for the RefactoringTool to use. By default
    "lib2to3.fixes.*" is used. options is an optional dictionary of options to
    be passed to the RefactoringTool.
    Ncsg|]}�d|�qS)z.fixes.fix_r)�.0Zfix)�	fixer_pkgrr�
<listcomp>*s	z"get_refactorer.<locals>.<listcomp>z.fixesZexplicitT)rZget_fixers_from_packageZRefactoringTool)rZfixersZoptionsr)rr�get_refactorer!s
rccs^xWtjt�D]F\}}}x4|D],}|jd�r&tjj||�Vq&q&WqWdS)Nz.py)�os�walk�proj_dir�endswith�path�join)�dirpathZdirnames�	filenames�filenamerrr�all_project_files0s
r)�__doc__r�sysrZos.path�re�textwraprrrrZ
lib2to3.pgen2rr�dirname�__file__Ztest_dir�normpathrrZgrammar_pathZload_grammarZgrammarZDriverrrrr	rrZTestCaserrrr�<module>s&!