HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/lib2to3/tests/__pycache__/support.cpython-310.pyc
o

�i��@s�dZddlZddlZddlZddlmZddlmZmZddl	m
Zej�
e�Zej�ej�ed��Zej�edd�Ze�e�Ze�e�Zejd=ejeejd	�Z
ejeejd	�Zd
d�Zddd
�Zdd�Zddd�Zdd�Zej Z dS)z Support code for test_*.py files�N��dedent)�pytree�refactor)�driverz..zGrammar.txt�print)�convertcCstjt|�dd�S)NT)�debug)r�parse_string�reformat��string�r�2/usr/local/lib/python3.10/lib2to3/tests/support.pyr
sr
cCs,|durt���|�}tjdd��|�dS)N�)�	verbosity)�unittestZ
TestLoaderZloadTestsFromModuleZTextTestRunner�run)Ztest_modZtestsrrr�
run_all_testssrcCst|�dS)Nz

rrrrrr"sr�lib2to3csB|dur�fdd�|D�}nt��d�}|pi}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>.sz"get_refactorer.<locals>.<listcomp>z.fixesT)Zexplicit)rZget_fixers_from_packageZRefactoringTool)rZfixers�optionsrrr�get_refactorer%s
rccs@�t�t�D]\}}}|D]}|�d�rtj�||�Vq
qdS)Nz.py)�os�walk�proj_dir�endswith�path�join)�dirpath�dirnames�	filenames�filenamerrr�all_project_files4s�
���r&)NN)rNN)!�__doc__rrZos.path�textwraprrrrZ
lib2to3.pgen2rZpgen2_driverr �dirname�__file__Ztest_dir�normpathr!rZgrammar_pathZload_grammarZgrammarZgrammar_no_print_statement�keywordsZDriverrZdriver_no_print_statementr
rrrr&ZTestCaserrrr�<module>s0

�