Your IP : 216.73.216.213


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



��YfT�@s�ddlZddlZddlmZddlmZmZddlmZed�Gdd�deej�Z	e	fZ
edkr�ee
�dS)	�N)�ttk)�requires�run_unittest)�AbstractTkTestZguics^eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z�S)
�	StyleTestcs&t�j�tj|j�|_dS)N)�super�setUprZStyle�root�style)�self)�	__class__��E/opt/alt/python35/lib64/python3.5/tkinter/test/test_ttk/test_style.pyrs
zStyleTest.setUpcCsU|j}|jddd�|j|jdd�d�|j|jd�t�dS)N�TButton�
background�yellow)r
�	configure�assertEqual�assertIsInstance�dict)rr
r
r
r�test_configures
	zStyleTest.test_configurecCsm|j}|jdddg�|j|jdd�|jrFdgndg�|j|jd�t�dS)	Nrr�active�blue�active background)rrr)rrr)rr)r
�maprZwantobjectsrr)rr
r
r
r�test_maps	
zStyleTest.test_mapcCs�|j}|jddd�|jddd	g�|j|jdd�d�|j|jddddg�d�|j|jdddd�d�dS)
NrrrrrZoptionnotdefined�defaultZiknewit)rrr)r
rrr�lookup)rr
r
r
r�test_lookup!s	zStyleTest.test_lookupcCs�|j}|jtj|jd�|jd�}|jdd�|j|jd�dddifg�|jd|�|j|jd�|�|j|jd�t�|jtj|jddd	d
ifg�dS)NZ
NotALayoutZTreeview�ZnullZstickyZnswer�nameZoptionZ
inexistent)r
�assertRaises�tkinter�TclErrorZlayoutrr�list)rr
Ztv_styler
r
r�test_layout-s	zStyleTest.test_layoutcCs�|jtj|jjd�|jj�}d}x>|jj�D])}||krA|}|jj|�PqAWdS|j||k�|j||jj�k�|jj|�dS)NZnonexistingname)r!r"r#r
Z	theme_useZtheme_namesZassertFalse)rZ
curr_themeZ	new_themeZthemer
r
r�test_theme_useDszStyleTest.test_theme_use)	�__name__�
__module__�__qualname__rrrrr%r&r
r
)rrr	s	r�__main__)Zunittestr"rZtest.supportrrZtkinter.test.supportrZTestCaserZ	tests_guir'r
r
r
r�<module>s
P