Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/tkinter/test/test_tkinter/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/tkinter/test/test_tkinter/__pycache__/test_font.cpython-35.pyc



��Yf1�@s�ddlZddlZddlmZddlmZmZddlmZed�dZGdd�deej	�Z
e
fZed	kr�ee�dS)
�N)�font)�requires�run_unittest)�AbstractTkTestZguiZ
TkDefaultFontc@s�eZdZedd��Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�ZdS)�FontTestc
Csxtjj|�y(tjd|jdtdd�|_Wn9tjk
rstjd|jdtdd�|_YnXdS)N�root�name�existsTF)	r�
setUpClass�__func__r�Fontr�fontname�tkinterZTclError)�cls�r�H/opt/alt/python35/lib64/python3.5/tkinter/test/test_tkinter/test_font.pyr

s
(zFontTest.setUpClasscCsL|jj�}|jt|�ddddddh�xI|D]A}|j|jj|�||�|j|j|||�q>WxUdD]M}|j||t�|j|jj|�t�|j|j|t�q�W|jr�t	nt}xUdD]M}|j|||�|j|jj|�|�|j|j||�q�WdS)	N�family�size�weight�slant�	underline�
overstrike)rrr)rrr)
rZ	configure�assertGreaterEqual�set�assertEqualZcget�assertIsInstance�str�wantobjects�int)�self�options�key�sizetyperrr�test_configures
 

zFontTest.test_configurecCs|jj�}|jt|�ddddddh�x.|D]&}|j|jj|�||�q>Wx>dD]6}|j||t�|j|jj|�t�qoW|jr�tnt}x>dD]6}|j|||�|j|jj|�|�q�WdS)	Nrrrrrr)rrr)rrr)	rZactualrrrrrrr)rr r!r"rrr�test_actual&s
$
 
zFontTest.test_actualcCs3|j|jjt�|jt|j�t�dS)N)rrrr
r)rrrr�	test_name4szFontTest.test_namecCs�tjd|jdtdd�}tjd|jdtdd�}|j||�|j||�|j||j��|j|d�dS)Nrrr	Tr)rrrr
ZassertIsNotrZassertNotEqual�copy)rZfont1Zfont2rrr�test_eq8s!!zFontTest.test_eqcCs |j|jjd�t�dS)N�abc)rrZmeasurer)rrrr�test_measure@szFontTest.test_measurecCs�|jj�}|jt|�ddddh�x^|D]V}|j|jj|�||�|j||t�|j|jj|�t�q8WdS)NZascentZdescentZ	linespaceZfixed)r�metricsrrrrr)rr*r!rrr�test_metricsCs
 zFontTest.test_metricscCsatj|j�}|j|t�|j|�x+|D]#}|j|t�|j|�q6WdS)N)r�familiesrr�tuple�
assertTruer)rr,rrrr�
test_familiesLs

zFontTest.test_familiescCsqtj|j�}|j|t�|j|�x+|D]#}|j|t�|j|�q6W|jt|�dS)N)	r�namesrrr-r.rZassertInr
)rr0rrrr�
test_namesTs

zFontTest.test_namesN)
�__name__�
__module__�__qualname__�classmethodr
r#r$r%r'r)r+r/r1rrrrrs	r�__main__)
ZunittestrrZtest.supportrrZtkinter.test.supportrr
ZTestCaserZ	tests_guir2rrrr�<module>s
R