Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/tkinter/test/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/tkinter/test/__pycache__/runtktests.cpython-35.pyc



��Yf��@s�dZddlZddlZddlZddlZddlZejjejj	e
��Zdd�Zedddd�Z
ddddd	�Zed
kr�ejje��dS)z�
Use this module to get and run all tk tests.

tkinter tests should live in a package inside the directory where this file
lives, like test_tkinter.
Extensions also should live in packages following the same rule as above.
�NcCs.x'tj|�D]}|dkrdSqWdS)N�__init__.py�__init__.pycTF)rr)�os�listdir)�path�name�r�</opt/alt/python35/lib64/python3.5/tkinter/test/runtktests.py�
is_packagesr
Tc	#s7d�x*tj|�D]\}}}x1t|�D]#}|ddkr2|j|�q2Wt|�r|r|t|�ttj�d�jdd�}|r�||kr�qt�fdd�|�}xb|D]Z}y0t	j
d||dt���fd	�VWq�tjj
k
r*|r&�Yq�Xq�WqWdS)
z�This will import and yield modules whose names start with test_
    and are inside packages found in the path starting at basepath.

    If packages is specified it should contain package names that
    want their tests collected.
    z.pyr�.N�/cs|jd�o|j��S)NZtest_)�
startswith�endswith)�x)�py_extrr	�<lambda>+sz#get_tests_modules.<locals>.<lambda>z.%s.%sztkinter.test)r�walk�list�remover
�len�sep�replace�filter�	importlib�
import_module�test�supportZResourceDenied)	Zbasepath�gui�packages�dirpathZdirnames�	filenames�dirnameZpkg_namerr)rr	�get_tests_moduless(/	
r"ccs�g}|r|jd�|r,|jd�xPtd|d|�D]9}x0|D](}xt||f�D]}|VqhWqOWqBWdS)z�Yield all the tests in the modules found by get_tests_modules.

    If nogui is True, only tests that do not require a GUI will be
    returned.Ztests_noguiZ	tests_guirrN)�appendr"�getattr)�textrrZattrs�module�attrrrrr	�	get_tests7s


r(�__main__)�__doc__r�sysZunittestrZtest.supportrr�abspathr!�__file__Z
this_dir_pathr
r"r(�__name__rZrun_unittestrrrr	�<module>s