HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/python38/lib/python3.8/tkinter/test/test_ttk/__pycache__/test_style.cpython-38.pyc
U

�i�_T�@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__��?/opt/python38/lib/python3.8/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
rrr�test_configures�zStyleTest.test_configurecCsN|j}|jddgd�|�|�dd�|jr0dgndg�|�|�d�t�dS)Nr��activer�bluerr)zactive backgroundr)r
�maprZwantobjectsrrrrrr�test_maps�zStyleTest.test_mapcCsn|j}|jddd�|jddgd�|�|�dd�d�|�|�ddddg�d�|�|jddd	d
�d	�dS)NrrrrrrrZoptionnotdefinedZiknewit)�default)r
rrr�lookuprrrr�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_stylerrr�test_layout-s
��zStyleTest.test_layoutcCs�|�tj|jjd�|j��}d}|j��D] }||kr,|}|j�|�qRq,dS|�||k�|�||j��k�|j�|�dS)NZnonexistingname)r%r&r'r
Z	theme_useZtheme_namesZassertFalse)rZ
curr_themeZ	new_themeZthemerrr�test_theme_useDs�
zStyleTest.test_theme_use)
�__name__�
__module__�__qualname__rrrr!r)r*�
__classcell__rrrrr	s	r�__main__)Zunittestr&rZtest.supportrrZtkinter.test.supportrZTestCaserZ	tests_guir+rrrr�<module>sP