Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/tkinter/test/test_tkinter/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/tkinter/test/test_tkinter/__pycache__/test_font.cpython-37.pyc

B

� f��@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�H/opt/alt/python37/lib64/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)	rZactualrrrrrr 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"r/r$rrr�test_metricsMs


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

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

zFontTest.test_namesN)�__name__�
__module__�__qualname__�classmethodrr&r(r)r*r,r.r0r4r6rrrrrs
	r�__main__)ZunittestrrZtest.supportrrrZtkinter.test.supportrrZTestCaserZ	tests_guir7rrrr�<module>s\