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_tkinter/__pycache__/test_font.cpython-37.pyc
B

��g��@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�|�ytj|jtdd�|_Wn*tjk
rNtj|jtdd�|_YnXdS)NT)�root�name�existsF)	r�
setUpClass�__func__r�Fontr�fontname�tkinter�TclError)�cls�r�?/usr/local/lib/python3.7/tkinter/test/test_tkinter/test_font.pyr
s
zFontTest.setUpClassc	Cs�|j��}|�t|�ddddddh�x:|D]2}|�|j�|�||�|�|j|||�q,WxBdD]:}|�||t�|�|j�|�t�|�|j|t�qhW|jr�t	nt}xBdD]:}|�|||�|�|j�|�|�|�|j||�q�WdS)	N�family�size�weight�slant�	underline�
overstrike)rrr)rrr)
rZ	configure�assertGreaterEqual�set�assertEqual�cget�assertIsInstance�str�wantobjects�int)�self�options�key�sizetyperrr�test_configures




zFontTest.test_configurecCsbd}ytj|j|dd�}Wn(tjk
rBtj|j|dd�}YnX|�|�d�|�~t�dS)NuMS ゴシックT)rrr
Fr)rr
rrrrrr)r"r�frrr�test_unicode_family&szFontTest.test_unicode_familyc	Cs�|j��}|�t|�ddddddh�x$|D]}|�|j�|�||�q,Wx0dD](}|�||t�|�|j�|�t�qRW|jr�tnt}x0dD](}|�|||�|�|j�|�|�q�WdS)	Nrrrrrr)rrr)rrr)	r�actualrrrrrr r!)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)NT)rr	r
r)rr
rrZassertIsNotrZassertNotEqual�copy)r"Zfont1Zfont2rrr�test_eqBszFontTest.test_eqcCs|�|j�d�t�dS)N�abc)rrZmeasurer!)r"rrr�test_measureJszFontTest.test_measurecCsp|j��}|�t|�ddddh�xH|D]@}|�|j�|�||�|�||t�|�|j�|�t�q(WdS)NZascentZdescentZ	linespaceZfixed)r�metricsrrrrr!)r"r0r$rrr�test_metricsMs


zFontTest.test_metricscCsJt�|j�}|�|t�|�|�x"|D]}|�|t�|�|�q(WdS)N)r�familiesrr�tuple�
assertTruer)r"r2rrrr�
test_familiesVs

zFontTest.test_familiescCsVt�|j�}|�|t�|�|�x"|D]}|�|t�|�|�q(W|�t|�dS)N)	r�namesrrr3r4rZassertInr)r"r6r	rrr�
test_names^s

zFontTest.test_namesN)�__name__�
__module__�__qualname__�classmethodrr&r(r*r+r-r/r1r5r7rrrrrs
	r�__main__)ZunittestrrZtest.supportrrrZtkinter.test.supportrrZTestCaserZ	tests_guir8rrrr�<module>s\