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.10/tkinter/test/test_tkinter/__pycache__/test_font.cpython-310.opt-1.pyc
o

�iV�@s�ddlZddlZddlmZddlmZmZmZddlmZm	Z	ed�dZ
Gdd�deej�ZGd	d
�d
e	ej�Z
edkrDe��dSdS)�N)�font)�requires�
gc_collect�	ALWAYS_EQ)�AbstractTkTest�AbstractDefaultRootTestZguiZ
TkDefaultFontc@speZdZedd��Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�FontTestcCsRtj�|�z
tj|jtdd�|_WdStjy(tj|jtdd�|_YdSw)NT��root�name�existsF)	r�
setUpClass�__func__r�Fontr
�fontname�tkinter�TclError)�cls�r�@/usr/local/lib/python3.10/tkinter/test/test_tkinter/test_font.pyr

s�zFontTest.setUpClasscCs�|j��}|�t|�hd��|D]}|�|j�|�||�|�|j|||�qdD]}|�||t�|�|j�|�t�|�|j|t�q-|jrPt	nt}dD]}|�|||�|�|j�|�|�|�|j||�qTdS�N>�weight�	underline�slant�size�
overstrike�family)rrr)rrr)
rZ	configure�assertGreaterEqual�set�assertEqual�cget�assertIsInstance�str�wantobjects�int��self�options�keyZsizetyperrr�test_configures"

��zFontTest.test_configurecCs`d}ztj|j|dd�}Wntjy tj|j|dd�}Ynw|�|�d�|�~t�dS)NuMS ゴシックT)r
rrFr)rrr
rrrr r)r&r�frrr�test_unicode_family&s�
zFontTest.test_unicode_familycCs�|j��}|�t|�hd��|D]}|�|j�|�||�qdD]}|�||t�|�|j�|�t�q"|jr<tnt}dD]}|�|||�|�|j�|�|�q@dSr)	r�actualrrrr!r"r#r$r%rrr�test_actual0s

��zFontTest.test_actualcCs&|�|jjt�|�t|j�t�dS�N)rrrrr"�r&rrr�	test_name>szFontTest.test_namecCs�tj|jtdd�}tj|jtdd�}|�||�|�||�|�||���|�|d�|�|t�t	�
�}|�|j�tj|tdd�}|�t
|�t
|��|�||�dS)NTr	r)rrr
rZassertIsNotrZassertNotEqual�copyrr�TkZ
addCleanup�destroyr")r&Zfont1Zfont2�root2Zfont3rrr�
test_equalityBszFontTest.test_equalitycCs|�|j�d�t�dS)N�abc)r!rZmeasurer$r/rrr�test_measureRszFontTest.test_measurecCsh|j��}|�t|�hd��|D] }|�|j�|�||�|�||t�|�|j�|�t�qdS)N>�fixedZ	linespaceZdescentZascent)r�metricsrrrr!r$)r&r9r(rrr�test_metricsUs

��zFontTest.test_metricscCsFt�|j�}|�|t�|�|�|D]
}|�|t�|�|�qdSr.)r�familiesr
r!�tuple�
assertTruer")r&r;rrrr�
test_families^s
�zFontTest.test_familiescCsRt�|j�}|�|t�|�|�|D]
}|�|t�|�|�q|�t|�dSr.)	r�namesr
r!r<r=r"�assertInr)r&r?rrrr�
test_namesfs
zFontTest.test_namescCs0tjt|jd�}|�|tj�|�|jt�dS)N)r
)r�
nametofontrr
r!rrr)r&�testfontrrr�test_nametofontoszFontTest.test_nametofontcCs|�t|j�dt�d��dS)Nz<tkinter.font.Font object �>)r�reprrrr/rrr�	test_reprts�zFontTest.test_reprN)�__name__�
__module__�__qualname__�classmethodr
r)r+r-r0r5r7r:r>rArDrGrrrrrs

		rc@s$eZdZdd�Zdd�Zdd�ZdS)�DefaultRootTestcCsv|�ttj�t��}t��}|�|t�|�|�|D]
}|�|t	�|�|�q|�
�t��|�ttj�dSr.)�assertRaises�RuntimeErrorrr;rr2r!r<r=r"r3�
NoDefaultRoot)r&r
r;rrrrr>|s
zDefaultRootTest.test_familiescCs�|�ttj�t��}t��}|�|t�|�|�|D]
}|�|t	�|�|�q|�
t|�|��t�
�|�ttj�dSr.)rMrNrr?rr2r!r<r=r"r@rr3rO)r&r
r?rrrrrA�s
zDefaultRootTest.test_namescCsb|�ttjt�t��}t�t�}|�|tj�|�	|j
t�|��t��|�ttjt�dSr.)
rMrNrrBrrr2r!rrrr3rO)r&r
rCrrrrD�s
zDefaultRootTest.test_nametofontN)rHrIrJr>rArDrrrrrLzs
rL�__main__)ZunittestrrZtest.supportrrrZtkinter.test.supportrrrZTestCaserrLrH�mainrrrr�<module>so(�