Your IP : 216.73.216.213


Current Path : /opt/alt/python36/lib64/python3.6/tkinter/test/test_ttk/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/tkinter/test/test_ttk/__pycache__/test_style.cpython-36.pyc

3

� fT�@snddlZddlZddlmZddlmZmZddlmZed�Gdd�deej�Z	e	fZ
edkrjee
�dS)	�N)�ttk)�requires�run_unittest)�AbstractTkTestZguicsDeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z�Z	S)
�	StyleTestcst�j�tj|j�|_dS)N)�super�setUprZStyle�root�style)�self)�	__class__��E/opt/alt/python36/lib64/python3.6/tkinter/test/test_ttk/test_style.pyrs
zStyleTest.setUpcCs>|j}|jddd�|j|jdd�d�|j|jd�t�dS)N�TButton�yellow)�
backgroundr)r
�	configure�assertEqual�assertIsInstance�dict)rr
r
r
r�test_configures
zStyleTest.test_configurecCsN|j}|jddgd�|j|jdd�|jr0dgnd	g�|j|jd�t�dS)
Nr�activer�blue)r�active background)rrr)rrr)rr)r
�maprZwantobjectsrr)rr
r
r
r�test_mapszStyleTest.test_mapcCsn|j}|jddd�|jdd
gd�|j|jdd�d�|j|jddddg�d�|j|jdddd	�d�dS)Nrr)rrrrZoptionnotdefinedZiknewit)�default)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}x0|jj�D]}||kr.|}|jj|�Pq.WdS|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&�
__classcell__r
r
)rrr	s	r�__main__)Zunittestr"rZtest.supportrrZtkinter.test.supportrZTestCaserZ	tests_guir'r
r
r
r�<module>sP