Sindbad~EG File Manager
�
)Μg� � � � d Z ddlZddlZddlZddlmZ ddlZddlmZmZ ddl m
Z ej j ej � Zej j e� Zej j# ej j% ed� � Zej j% ed� Z ej* e� Z ej* e� Zej0 d= ej2 eej4 � � Z
ej2 eej4 � � Zd
� Zdd�Zd� Zdd
�Zd� Z d� Z!ejD Z"y)z Support code for test_*.py files� N��dedent)�pytree�refactor)�driverz..zGrammar.txt�print)�convertc �B � t j t | � d�� S )NT)�debug)r �parse_string�reformat��strings �6/usr/local/lib/python3.12/test/test_lib2to3/support.pyr r s � ����x��/�t��<�<� c � � |�#t j � j | � }t j d�� j |� y )N� )� verbosity)�unittest�
TestLoader�loadTestsFromModule�TextTestRunner�run)�test_mod�testss r �
run_all_testsr s9 � ��}��#�#�%�9�9�(�C�����a�(�,�,�U�3r c � � t | � dz S )Nz
r r s r r
r
$ s � ��&�>�F�"�"r c � � |�|D �cg c]
}| dz |z �� }}nt j | dz � }|xs i }t j ||d�� S c c}w )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.
z.fixes.fix_z.fixesT)�explicit)r �get_fixers_from_package�RefactoringTool)� fixer_pkg�fixers�options�fixs r �get_refactorerr&