Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/tkinter/test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/tkinter/test/__pycache__/runtktests.cpython-34.pyc

�
h f��@s�dZddlZddlZddlZddlZddlZejjejj	e
��Zdd�Zedddd�Z
ddddd	�Zed
kr�ejje��ndS)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__.pyc�
__init.pyoTF)rrr)�os�listdir)�path�name�r	�</opt/alt/python34/lib64/python3.4/tkinter/test/runtktests.py�
is_packagesrTc	#sCd�x6tj|�D]%\}}}x4t|�D]&}|ddkr2|j|�q2q2Wt|�r|r|t|�ttj�d�jdd�}|r�||kr�qnt�fdd�|�}xh|D]]}y0t	j
d||dt���fd	�VWq�tjj
k
r3|r/�nYq�Xq�WqqWdS)
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_extr	r
�<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�n|r2|jd�nxPtd|d|�D]9}x0|D](}xt||f�D]}|VqnWqUWqHWdS)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)�textrr�attrs�module�attrrr	r	r
�	get_tests7s
r*�__main__)�__doc__r�sysZunittestrZtest.supportrr�abspathr"�__file__Z
this_dir_pathrr#r*�__name__rZrun_unittestr	r	r	r
�<module>s