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_tkinter/__pycache__/test_font.cpython-38.pyc
U

�i�_��@svddlZddlZddlmZddlmZmZmZddlmZed�dZ	Gdd�deej
�ZefZe
d	krree�dS)
�N)�font)�requires�run_unittest�
gc_collect)�AbstractTkTestZguiZ
TkDefaultFontc@s`eZdZedd��Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dS)�FontTestcCsTtj�|�ztj|jtdd�|_Wn*tjk
rNtj|jtdd�|_YnXdS)NT��root�name�existsF)	r�
setUpClass�__func__r�Fontr	�fontname�tkinter�TclError)�cls�r�B/opt/python38/lib/python3.8/tkinter/test/test_tkinter/test_font.pyr
s
zFontTest.setUpClassc	Cs�|j��}|�t|�ddddddh�|D]2}|�|j�|�||�|�|j|||�q*dD]:}|�||t�|�|j�|�t�|�|j|t�qb|jr�t	nt}dD]:}|�|||�|�|j�|�|�|�|j||�q�dS�	N�family�size�weight�slant�	underline�
overstrike)rrr)rrr)
rZ	configure�assertGreaterEqual�set�assertEqual�cget�assertIsInstance�str�wantobjects�int��self�options�keyZsizetyperrr�test_configures 

�zFontTest.test_configurecCsbd}ztj|j|dd�}Wn(tjk
rBtj|j|dd�}YnX|�|�d�|�~t�dS)NuMS ゴシックT)r	rrFr)rrr	rrrrr)r%r�frrr�test_unicode_family&szFontTest.test_unicode_familyc	Cs�|j��}|�t|�ddddddh�|D]}|�|j�|�||�q*dD](}|�||t�|�|j�|�t�qL|jr�tnt}dD](}|�|||�|�|j�|�|�q�dSr)	r�actualrrrr r!r"r#r$rrr�test_actual0s

�zFontTest.test_actualcCs&|�|jjt�|�t|j�t�dS�N)rrr
rr!�r%rrr�	test_name>szFontTest.test_namecCs\tj|jtdd�}tj|jtdd�}|�||�|�||�|�||���|�|d�dS)NTrr)rrr	rZassertIsNotrZassertNotEqual�copy)r%Zfont1Zfont2rrr�test_eqBszFontTest.test_eqcCs|�|j�d�t�dS)N�abc)r rZmeasurer#r.rrr�test_measureJszFontTest.test_measurecCsl|j��}|�t|�ddddh�|D]@}|�|j�|�||�|�||t�|�|j�|�t�q&dS)NZascentZdescentZ	linespaceZfixed)r�metricsrrrr r#)r%r4r'rrr�test_metricsMs


�zFontTest.test_metricscCsFt�|j�}|�|t�|�|�|D]}|�|t�|�|�q&dSr-)r�familiesr	r �tuple�
assertTruer!)r%r6rrrr�
test_familiesVs
zFontTest.test_familiescCsRt�|j�}|�|t�|�|�|D]}|�|t�|�|�q&|�t|�dSr-)	r�namesr	r r7r8r!ZassertInr)r%r:r
rrr�
test_names^s
zFontTest.test_namesN)�__name__�
__module__�__qualname__�classmethodrr(r*r,r/r1r3r5r9r;rrrrrs

	r�__main__)ZunittestrrZtest.supportrrrZtkinter.test.supportrrZTestCaserZ	tests_guir<rrrr�<module>s\