HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/tkinter/test/test_tkinter/__pycache__/test_font.cpython-311.opt-1.pyc
�

��Vc�����ddlZddlZddlmZddlmZmZmZddlmZm	Z	ed��dZ
Gd�deej��ZGd	�d
e	ej��Z
edkrej��dSdS)�N)�font)�requires�
gc_collect�	ALWAYS_EQ)�AbstractTkTest�AbstractDefaultRootTest�gui�
TkDefaultFontc�f�eZdZed���Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
S)�FontTestc�
�tj�|��	tj|jtd���|_dS#tj$r*tj|jtd���|_YdSwxYw)NT��root�name�existsF)	r�
setUpClass�__func__r�Fontr�fontname�tkinter�TclError)�clss �7D:\Python311\Lib\tkinter\test\test_tkinter\test_font.pyrzFontTest.setUpClass
s���!�*�*�3�/�/�/�	M��y�c�h�X�d�K�K�K�C�H�H�H����	M�	M�	M��y�c�h�X�e�L�L�L�C�H�H�H�H�	M���s�&A	�	5B�Bc�J�|j���}|�t|��hd���|D]]}|�|j�|��||��|�|j|||���^dD]|}|�||t��|�|j�|��t��|�|j|t���}|jrtnt}dD]m}|�|||��|�|j�|��|��|�|j||���ndS�N>�size�slant�family�weight�	underline�
overstrike)rrr)rr r!)
r�	configure�assertGreaterEqual�set�assertEqual�cget�assertIsInstance�str�wantobjects�int��self�options�key�sizetypes    r�test_configurezFontTest.test_configures����)�%�%�'�'������G���L�L�L�	N�	N�	N��	;�	;�C����T�Y�^�^�C�0�0�'�#�,�?�?�?����T�Y�s�^�W�S�\�:�:�:�:�.�	7�	7�C��!�!�'�#�,��4�4�4��!�!�$�)�.�.��"5�"5�s�;�;�;��!�!�$�)�C�.�#�6�6�6�6��*�3�3�3���4�	<�	<�C��!�!�'�#�,��9�9�9��!�!�$�)�.�.��"5�"5�x�@�@�@��!�!�$�)�C�.�(�;�;�;�;�	<�	<�c��d}	tj|j|d���}n1#tj$rtj|j|d���}YnwxYw|�|�d��|��~t��dS)NuMS ゴシックT)rrrFr)rrrrrr%r&r)r,r�fs   r�test_unicode_familyzFontTest.test_unicode_family&s���.��	G��	�t�y���E�E�E�A�A����	G�	G�	G��	�t�y���F�F�F�A�A�A�	G�����������)�)�6�2�2�2�
������s�!�+A�Ac�n�|j���}|�t|��hd���|D]6}|�|j�|��||���7dD]V}|�||t��|�|j�|��t���W|jrtnt}dD]L}|�|||��|�|j�|��|���MdSr)	r�actualr#r$r%r'r(r)r*r+s    r�test_actualzFontTest.test_actual0sB���)�"�"�$�$������G���L�L�L�	N�	N�	N��	B�	B�C����T�Y�-�-�c�2�2�G�C�L�A�A�A�A�.�	>�	>�C��!�!�'�#�,��4�4�4��!�!�$�)�"2�"2�3�"7�"7��=�=�=�=��*�3�3�3���4�	C�	C�C��!�!�'�#�,��9�9�9��!�!�$�)�"2�"2�3�"7�"7��B�B�B�B�	C�	Cr1c��|�|jjt��|�t	|j��t��dS�N)r%rrrr(�r,s r�	test_namezFontTest.test_name>s@���������2�2�2�����T�Y����2�2�2�2�2r1c��tj|jtd���}tj|jtd���}|�||��|�||��|�||�����|�|d��|�|t��tj
��}|�|j��tj|td���}|�t|��t|����|�||��dS)NTrr)rrrr�assertIsNotr%�assertNotEqual�copyrr�Tk�
addCleanup�destroyr()r,�font1�font2�root2�font3s     r�
test_equalityzFontTest.test_equalityBs���	�t�y�x��E�E�E���	�t�y�x��E�E�E�������&�&�&������&�&�&����E�5�:�:�<�<�0�0�0����E�1�%�%�%�����	�*�*�*��
��������
�&�&�&��	�u�8�D�A�A�A������U���S��Z�Z�0�0�0����E�5�)�)�)�)�)r1c�l�|�|j�d��t��dS)N�abc)r'r�measurer*r:s r�test_measurezFontTest.test_measureRs.�����d�i�/�/��6�6��<�<�<�<�<r1c��|j���}|�t|��hd���|D]�}|�|j�|��||��|�||t��|�|j�|��t����dS)N>�fixed�ascent�descent�	linespace)r�metricsr#r$r%r'r*)r,rQr.s   r�test_metricszFontTest.test_metricsUs����)�#�#�%�%������G���7�7�7�	9�	9�	9��	?�	?�C����T�Y�.�.�s�3�3�W�S�\�B�B�B��!�!�'�#�,��4�4�4��!�!�$�)�"3�"3�C�"8�"8�#�>�>�>�>�	?�	?r1c��tj|j��}|�|t��|�|��|D]2}|�|t��|�|���3dSr9)r�familiesrr'�tuple�
assertTruer()r,rTrs   r�
test_familieszFontTest.test_families^s���=���+�+�����h��.�.�.�����!�!�!��	$�	$�F��!�!�&�#�.�.�.��O�O�F�#�#�#�#�	$�	$r1c�8�tj|j��}|�|t��|�|��|D]2}|�|t��|�|���3|�t|��dSr9)	r�namesrr'rUrVr(�assertInr)r,rYrs   r�
test_nameszFontTest.test_namesfs����
�4�9�%�%�����e�U�+�+�+���������	"�	"�D��!�!�$��,�,�,��O�O�D�!�!�!�!��
�
�h��&�&�&�&�&r1c���tjt|j���}|�|tj��|�|jt��dS)N)r)r�
nametofontrrr'rr%r)r,�testfonts  r�test_nametofontzFontTest.test_nametofontosN���?�8�$�)�<�<�<�����h��	�2�2�2�������1�1�1�1�1r1c�h�|�t|j��dt�d���dS)Nz<tkinter.font.Font object �>)r%�reprrrr:s r�	test_reprzFontTest.test_reprts=��������O�O�G�(�G�G�G�	
�	
�	
�	
�	
r1N)�__name__�
__module__�__qualname__�classmethodrr0r4r7r;rGrKrRrWr[r_rc�r1rrrs��������M�M��[�M�<�<�<�"���C�C�C�3�3�3�*�*�*� =�=�=�?�?�?�$�$�$�'�'�'�2�2�2�

�
�
�
�
r1rc� �eZdZd�Zd�Zd�ZdS)�DefaultRootTestc��|�ttj��t	j��}tj��}|�|t��|�|��|D]2}|�|t��|�|���3|�
��t	j��|�ttj��dSr9)�assertRaises�RuntimeErrorrrTrr@r'rUrVr(rB�
NoDefaultRoot)r,rrTrs    rrWzDefaultRootTest.test_families|s������,��
�6�6�6��z�|�|���=�?�?�����h��.�.�.�����!�!�!��	$�	$�F��!�!�&�#�.�.�.��O�O�F�#�#�#�#���������������,��
�6�6�6�6�6r1c�4�|�ttj��t	j��}tj��}|�|t��|�|��|D]2}|�|t��|�|���3|�
t|��|���t	j
��|�ttj��dSr9)rlrmrrYrr@r'rUrVr(rZrrBrn)r,rrYrs    rr[zDefaultRootTest.test_names�s������,��
�3�3�3��z�|�|���
�������e�U�+�+�+���������	"�	"�D��!�!�$��,�,�,��O�O�D�!�!�!�!��
�
�h��&�&�&���������������,��
�3�3�3�3�3r1c���|�ttjt��tj��}tjt��}|�|tj��|�	|j
t��|���tj��|�ttjt��dSr9)
rlrmrr]rrr@r'rr%rrBrn)r,rr^s   rr_zDefaultRootTest.test_nametofont�s������,����B�B�B��z�|�|���?�8�,�,�����h��	�2�2�2�������1�1�1���������������,����B�B�B�B�Br1N)rdrerfrWr[r_rhr1rrjrjzsF������7�7�7�4�4�4�C�C�C�C�Cr1rj�__main__)�unittestrr�test.supportrrr�tkinter.test.supportrrr�TestCaserrjrd�mainrhr1r�<module>rws����������������8�8�8�8�8�8�8�8�8�8�H�H�H�H�H�H�H�H���������l
�l
�l
�l
�l
�~�x�0�l
�l
�l
�^%C�%C�%C�%C�%C�-�x�/@�%C�%C�%C�P�z����H�M�O�O�O�O�O��r1