HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/tkinter/test/test_ttk/__pycache__/test_style.cpython-37.opt-2.pyc
B

��gT�@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���t�|j�|_dS)N)�super�setUprZStyle�root�style)�self)�	__class__��</usr/local/lib/python3.7/tkinter/test/test_ttk/test_style.pyrs
zStyleTest.setUpcCs>|j}|jddd�|�|�dd�d�|�|�d�t�dS)N�TButton�yellow)�
backgroundr)r
�	configure�assertEqual�assertIsInstance�dict)rr
r
r
r�test_configures
zStyleTest.test_configurecCsN|j}|jddgd�|�|�dd�|jr0dgndg�|�|�d�t�dS)Nr)�activer�blue)rr)zactive backgroundr)r
�maprZwantobjectsrr)rr
r
r
r�test_mapszStyleTest.test_mapcCsn|j}|jddd�|jddgd�|�|�dd�d�|�|�ddddg�d�|�|jddd	d
�d	�dS)Nrr)r)rrrrrrZoptionnotdefinedZiknewit)�default)r
rrr�lookup)rr
r
r
r�test_lookup!szStyleTest.test_lookupcCs�|j}|�tj|jd�|�d�}|�dd�|�|�d�dddifg�|�d|�|�|�d�|�|�|�d�t�|�tj|jddd	d
ifg�dS)NZ
NotALayoutZTreeview�ZnullZstickyZnswer�name�optionZ
inexistent)r
�assertRaises�tkinter�TclErrorZlayoutrr�list)rr
Ztv_styler
r
r�test_layout-s
zStyleTest.test_layoutcCs�|�tj|jjd�|j��}d}x0|j��D]}||kr.|}|j�|�Pq.WdS|�||k�|�||j��k�|j�|�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