
    e                        d Z ddlZddlZddlZddlmZ ddlmZmZ ddl	m
Z ej                            e          Zej                            ej                            ed                    Zej                            edd          Z ej        e          Z ej        e          Zej        d=  ej        eej        	          Z
 ej        eej        	          Zd
 ZddZd ZddZd Zej         Z dS )z Support code for test_*.py files    Ndedent)pytreerefactor)driverz..zGrammar.txtprint)convertc                 T    t                               t          |           d          S )NT)debug)r   parse_stringreformatstrings    '  /home/conda/feedstock_root/build_artifacts/python-split_1708115622739/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.11/lib2to3/tests/support.pyr   r      s#    x//t<<<    c                     |&t          j                                        |           }t          j        d                              |           d S )N   )	verbosity)unittest
TestLoaderloadTestsFromModuleTextTestRunnerrun)test_modtestss     r   run_all_testsr      sK    }#%%99(CCa(((,,U33333r   c                 &    t          |           dz   S )Nz

r   r   s    r   r   r   "   s    &>>F""r   lib2to3c                      | fd|D             }nt          j         dz             }|pi }t          j        ||d          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.
    Nc                      g | ]
}d z   |z   S )z.fixes.fix_ ).0fix	fixer_pkgs     r   
<listcomp>z"get_refactorer.<locals>.<listcomp>.   s#    DDDc)m+c1DDDr   z.fixesT)explicit)r   get_fixers_from_packageRefactoringTool)r$   fixersoptionss   `  r   get_refactorerr+   %   s\     DDDDVDDD1)h2FGGmG#FGdCCCCr   c               #      K   t          j        t                    D ]B\  } }}|D ]9}|                    d          r"t           j                            | |          V  :Cd S )Nz.py)oswalkproj_direndswithpathjoin)dirpathdirnames	filenamesfilenames       r   all_project_filesr7   4   sw      (*(9(9 6 6$9! 	6 	6H  '' 6gll7H55555	66 6r   )NN)r   NN)!__doc__r   r-   os.pathtextwrapr   r   r   r   lib2to3.pgen2r   pgen2_driverr1   dirname__file__test_dirnormpathr2   r/   grammar_pathload_grammargrammargrammar_no_print_statementkeywordsDriverr	   driver_no_print_statementr   r   r   r+   r7   TestCaser!   r   r   <module>rI      s   & &  				        % $ $ $ $ $ $ $ 0 0 0 0 0 07??8$$7BGLL48899w||HdM::
#,
#L
1
16\6|DD '0		Wfn	=	=	=/L/N   
= = =4 4 4 4
# # #D D D D6 6 6 r   