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_misc.cpython-311.opt-1.pyc
�

��Vc^?����ddlZddlZddlZddlZddlmZddlmZmZej	d��Gd�deej
��ZGd�deej
��Ze
d	krej��dSdS)
�N)�support)�AbstractTkTest�AbstractDefaultRootTest�guic�n�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�ZdS)�MiscTestc��|�dtj��|�dtj��|�tj��|�dtj��|�dtj��|�dtj��|�dtj��|�dtj��dS)N�Widget�CASCADE�re�sys�	constants�_tkerror�wantobjects)�assertIn�tkinter�__all__�assertIsNotNoner�assertNotIn)�selfs �7D:\Python311\Lib\tkinter\test\test_tkinter\test_misc.py�test_allzMiscTest.test_alls����
�
�h���0�0�0��
�
�i���1�1�1����W�_�-�-�-�����w��/�/�/�������0�0�0�����g�o�6�6�6�����W�_�5�5�5�������8�8�8�8�8�c��tj|jd���}tj|d���}|�t|��d��dS)N�top)�name�childz!<tkinter.Frame object .top.child>)r�Toplevel�root�Frame�assertEqual�repr)r�t�fs   r�	test_reprzMiscTest.test_reprsP����T�Y�U�3�3�3���M�!�'�*�*�*������a���"E�F�F�F�F�Frc�f�tj|j��}tj|��}tj|��}tj|��}t|���d��D]8}|�|���t|������9dS)N�.)�msg)
rrrr �Button�str�split�assertFalse�isidentifierr")rr#r$�f2�brs      r�test_generated_nameszMiscTest.test_generated_namess�����T�Y�'�'���M�!����
�]�1�
�
���N�2������F�F�L�L��%�%�	B�	B�D����T�.�.�0�0�d�4�j�j��A�A�A�A�	B�	Brc��|j}|�d��|�|dd��|�d��|�|dd��|�tjd|jd��|�d���|�|dd��|�dd�	��|�|dd��|�|d
d��|�dd�	��|�|dd��|�|d
d��|�tjd|jd���|�tjd|jd���|�tjd|jd�
��dS)N�black�
background�whitez^unknown color name "spam"$�spam)r3�blue�yellow)r3�highlightColor�highlightcolorz!^must specify a background color$)r5)r8)r�
tk_setPaletter!�assertRaisesRegexr�TclError�rrs  r�test_tk_setPalettezMiscTest.test_tk_setPalette's����y�����7�#�#�#�����l�+�W�5�5�5����7�#�#�#�����l�+�W�5�5�5����w�/�-��"�F�	,�	,�	,�	
���g��.�.�.�����l�+�W�5�5�5����f�X��F�F�F�����l�+�V�4�4�4�����.�/��:�:�:����h�v��F�F�F�����l�+�X�6�6�6�����.�/��8�8�8����w�/�-��"�v�	�	7�	7�	7�	
���w�/�3��"��	�	2�	2�	2�	
���w�/�3��"�6�	�	;�	;�	;�	;�	;rc���|j}d
�fd�	}|�|�d����d�|�d|��}|�||j�dd����|j�|j�dd|����\}}|���|��d��|�	tj��5|j�|��ddd��n#1swxYwYd�|�d|dd��}|���|��d��|�d	|��}|�||j�dd����|j�|j�dd|����\}}|�|��|��d��|�	tj��5|j�|��ddd��n#1swxYwYd�|�dtj|dd����}|���|��d��dS)Nr�c���||z�dS�N���start�step�counts  �r�callbackz%MiscTest.test_after.<locals>.callbackF�����D�L�E�E�Er�after�info�*��5i��rr@)r�assertIsNonerJr�tk�call�	splitlist�updater!�assertRaisesrr<�after_cancel�	functools�partial)rrrH�timer1�script�_rGs      @r�
test_afterzMiscTest.test_afterCs�����y��	!�	!�	!�	!�	!�	!�
	
���$�*�*�Q�-�-�(�(�(������A�x�(�(���
�
�f�d�g�l�l�7�F�;�;�<�<�<��g�'�'�����W�f�f�(M�(M�N�N�������
�
�
������"�"�"�
�
�
�w�/�
0�
0�	!�	!��G�L�L�� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!������A�x��R�0�0�����
�
�
������#�#�#����D�(�+�+���
�
�f�d�g�l�l�7�F�;�;�<�<�<��g�'�'�����W�f�f�(M�(M�N�N�������&�!�!�!������#�#�#�
�
�
�w�/�
0�
0�	!�	!��G�L�L�� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!������A�y�0��2�r�B�B�C�C�����
�
�
������#�#�#�#�#s$�>D%�%D)�,D)�:I!�!I%�(I%c���|j}d	�fd�	}d�|�|��}|�||j�dd����|j�|j�dd|����\}}|���|��d��|�tj
��5|j�|��ddd��n#1swxYwYd�|�|dd��}|���|��d��|�|��}|�||j�dd����|j�|j�dd|����\}}|�|��|��d��|�tj
��5|j�|��ddd��dS#1swxYwYdS)
Nrr@c���||z�dSrBrCrDs  �rrHz*MiscTest.test_after_idle.<locals>.callbackorIrrJrKrLrMrNrO)r�
after_idlerrQrRrS�update_idletasksr!rUrr<rV)rrrH�idle1rZr[rGs      @r�test_after_idlezMiscTest.test_after_idlels�����y��	!�	!�	!�	!�	!�	!�
������)�)���
�
�e�T�W�\�\�'�6�:�:�;�;�;��g�'�'�����W�f�e�(L�(L�M�M���������������"�"�"�
�
�
�w�/�
0�
0�	!�	!��G�L�L�� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�������"�b�1�1�������������#�#�#�����)�)���
�
�e�T�W�\�\�'�6�:�:�;�;�;��g�'�'�����W�f�e�(L�(L�M�M�������%� � � ������#�#�#�
�
�
�w�/�
0�
0�	!�	!��G�L�L�� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s$�C<�<D�D�H7�7H;�>H;c���|j}�fd�}|�d|��}|�|��}|�t��5|�d��ddd��n#1swxYwYd�|j�|j�dd|����\}}|j�|��|�	�d��|�|��|�tj��5|j�|��ddd��n#1swxYwY|�	�d��|�tj��5|j�dd|��ddd��n#1swxYwY|�|��d�|j�|j�dd|����\}}|j�|��|�	�d��|�|��|�tj��5|j�|��ddd��n#1swxYwY|�	�d��|�tj��5|j�dd|��ddd��dS#1swxYwYdS)Nc����dz
�dS)Nr@rC)rGs�rrHz,MiscTest.test_after_cancel.<locals>.callback�s����Q�J�E�E�Eri�rrJrKr@)rrJr_rU�
ValueErrorrVrQrSrRr!rr<)rrrHrYrarZr[rGs       @r�test_after_cancelzMiscTest.test_after_cancel�s����y��	�	�	�	�	����D�(�+�+������)�)���
�
�z�
*�
*�	$�	$����d�#�#�#�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$����g�'�'�����W�f�f�(M�(M�N�N��������V���������"�"�"����&�!�!�!�
�
�
�w�/�
0�
0�	!�	!��G�L�L�� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!������"�"�"�
�
�
�w�/�
0�
0�	2�	2��G�L�L��&�&�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�	
���&�!�!�!����g�'�'�����W�f�e�(L�(L�M�M��������V���������"�"�"����%� � � �
�
�
�w�/�
0�
0�	!�	!��G�L�L�� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!������"�"�"�
�
�
�w�/�
0�
0�	1�	1��G�L�L��&�%�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�	1�	1sZ�A5�5A9�<A9�E�E�E�F-�-F1�4F1�*J�J�J�K;�;K?�K?c���|j}|���|�d��|�|���d��|�d��|�|���d��|���|�tj��5|���ddd��dS#1swxYwYdS)NuÙñîuçōđěuÙñîçōđě�r�clipboard_clear�clipboard_appendr!�
clipboard_getrUrr<r=s  r�test_clipboardzMiscTest.test_clipboard�s'���y�����������h�'�'�'�����+�+�-�-�x�8�8�8����j�)�)�)�����+�+�-�-�/?�@�@�@�������
�
�
�w�/�
0�
0�	!�	!���� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!��	C+�+C/�2C/c���|j}|���|�d��|�|���d��|�d��|�|���d��|���|�tj��5|���ddd��dS#1swxYwYdS)Nu𝔘𝔫𝔦u𝔠𝔬𝔡𝔢u𝔘𝔫𝔦𝔠𝔬𝔡𝔢rhr=s  r�test_clipboard_astralzMiscTest.test_clipboard_astral�s(���y�����������n�-�-�-�����+�+�-�-�~�>�>�>����0�1�1�1�����+�+�-�-�/M�N�N�N�������
�
�
�w�/�
0�
0�	!�	!���� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!rmc�F���fd�}�j}|j}��|d��d����|d��d����|d��d��||d��d	��||d
��d����tj��5|d��ddd��n#1swxYwY��tj��5|d
��ddd��dS#1swxYwYdS)Nc�d��t||��D]\}}��||d����dS)N�!)�delta)�zip�assertAlmostEqual)�col1�col2�col1_channel�col2_channelrs    �r�assertApproxz-MiscTest.test_winfo_rgb.<locals>.assertApprox�sM���/2�$��o�o�
M�
M�*��l��&�&�|�\��&�L�L�L�L�
M�
Mr�red)�rrzdark slate blue)iHHi==i��z#F0F)r|rr|z#4a3c8c)iJJi<<i��z
#dede14143939)i��ii99z#123456789a)�o�N�7)r�	winfo_rgbr!rUrr<)rrzr�rgbs`   r�test_winfo_rgbzMiscTest.test_winfo_rgb�s����	M�	M�	M�	M�	M��y���n��	
�����U���]�3�3�3������.�/�/�1F�G�G�G������V���&>�?�?�?���S�S��^�^�%=�>�>�>���S�S��)�)�+C�D�D�D�
�
�
�w�/�
0�
0�	�	��C�
����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
�
�w�/�
0�
0�	�	��C�
����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s$�;C�C�C�=D�D�Dc�`�tj��}d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_|�t)|��d��dS)N�90z??r��[��100z<100 event>)r�Event�serial�num�height�keycode�state�time�width�x�y�char�keysym�
keysym_num�type�widget�x_root�y_rootrsr!r"�r�es  r�test_event_repr_defaultsz!MiscTest.test_event_repr_defaults�s����M�O�O�������������	��������������������������������������������a���-�0�0�0�0�0rc��tj��}d|_d|_d|_d|_d|_d|_d|_d|_	d	|_
d
|_d|_d|_
d|_td��|_tjj|_d
|_d|_d|_d|_|�t3|��d��dS)Nr��T���Air�i,�
��AzKey-Az.texti�i����z�<Configure event send_event=True state=Shift|Control|Button3|0x30000 keysym=Key-A keycode=65 char='A' num=3 delta=-1 focus=True x=10 y=20 width=300 height=200>)rr�r�r��focusr�r�r�r�r�r�r�r��
send_eventr��ordr��	EventType�	Configurer�r�r�r�rsr!r"r�s  r�test_event_reprzMiscTest.test_event_repr�s����M�O�O����������������	��������������������������3�x�x����"�,�������������������a���<�	=�	=�	=�	=�	=rc�t�Gd�dtj��}tj|tj��dS)Nc��eZdZdZeZdZdZeZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#d Z$d!Z%d"Z&d#Z'd$Z(d%Z)d&S)'�6MiscTest.test_eventtype_enum.<locals>.CheckedEventType�2�3�4�5�6�7�8�9�10�11�12�13�14�15�16�17�18�19�20�21�22�23�24�25�26�27�28�29�30�31�32�33�34�35�36�37�38N)*�__name__�
__module__�__qualname__�KeyPress�Key�
KeyRelease�ButtonPressr)�
ButtonRelease�Motion�Enter�Leave�FocusIn�FocusOut�Keymap�Expose�GraphicsExpose�NoExpose�
Visibility�Create�Destroy�Unmap�Map�
MapRequest�Reparentr��ConfigureRequest�Gravity�
ResizeRequest�	Circulate�CirculateRequest�Property�SelectionClear�SelectionRequest�	Selection�Colormap�
ClientMessage�Mapping�VirtualEvent�Activate�
Deactivate�
MouseWheelrCrr�CheckedEventTyper�s��������H��C��J��K� �F��M��F��E��E��G��H��F��F�!�N��H��J��F��G��E��C��J��H��I�#���G� �M��I�#���H�!�N�#���I��H� �M��G��L��H��J��J�J�Jrr�)�enum�StrEnum�_test_simple_enumrr�)rr�s  r�test_eventtype_enumzMiscTest.test_eventtype_enumsN��'	�'	�'	�'	�'	�t�|�'	�'	�'	�P	
��/��1B�C�C�C�C�Crc��dD]0}|�|j�|��d���1dD]0}|�|j�|��d���1|�t|jjd��|�t|jjd��|�t
|jjd��|�t
|jjd��dS)N)�true�yes�on�1r#r�r@TT)�false�no�off�0r$�nrFF�year�rC)�assertIsr�
getbooleanrUre�	TypeError)r�vs  r�test_getbooleanzMiscTest.test_getbooleanBs���<�	9�	9�A��M�M�$�)�.�.�q�1�1�4�8�8�8�8�>�	:�	:�A��M�M�$�)�.�.�q�1�1�5�9�9�9�9����*�d�i�&:�E�B�B�B����*�d�i�&:�B�?�?�?����)�T�Y�%9�4�@�@�@����)�T�Y�%9�2�>�>�>�>�>rc�j���g���fd�}�j�d|���j�d�����g���j�d�����dg�����j�����dS)Nc�|����d���j�d�jj��dS)Nr@�d)�appendrrJ�quit)�logrs��rrHz(MiscTest.test_mainloop.<locals>.callbackNs2����J�J�q�M�M�M��I�O�O�C����0�0�0�0�0rrr@r)rrJ�mainloopr!�
assertTrue�winfo_exists)rrHrs` @r�
test_mainloopzMiscTest.test_mainloopLs�������	1�	1�	1�	1�	1�	1�	
�	����X�&�&�&��	���1��������b�!�!�!��	���1��������q�c�"�"�"�����	�.�.�0�0�1�1�1�1�1rc�D�|j���}tj|j��}|�|���|��|�|dd�t��|�t|��d��|�|dt��|�|dt��|�|dt��|�	|dd��|�|dt��|�|j
t��|�|jt��|�|jt��|�	|j
d��|�|jt��|�|d|j
��|�|d|j��|�|d|j��|�|d|j
��|�|d|j��|�|d	k��|j
d
kr|�|jd��n|�|jd��|�t!|���|j
�d|j������dS)N�rr@�r�)�alpha�beta�	candidate�final�)rrr)r@rrrr')r�info_patchlevelrr r!�assertIsInstance�tuple�len�intr�major�minor�micro�releaselevelr�rr*�
startswith)r�vir$s   r�test_info_patchlevelzMiscTest.test_info_patchlevelXs���
�Y�
&�
&�
(�
(���M�$�)�$�$������*�*�,�,�b�1�1�1����b����e�U�+�+�+�����R���!�$�$�$����b��e�S�)�)�)����b��e�S�)�)�)����b��e�S�)�)�)��
�
�b��e�D�E�E�E����b��e�S�)�)�)����b�h��,�,�,����b�h��,�,�,����b�h��,�,�,��
�
�b�o�'A�B�B�B����b�i��-�-�-�����A����)�)�)�����A����)�)�)�����A����)�)�)�����A����0�0�0�����A���	�*�*�*�����W��%�%�%�
�?�g�%�	*����R�Y��*�*�*�*����R�X�q�)�)�)�����B���*�*�b�h�+C�+C���+C�+C�D�D�E�E�E�E�ErN)r�r�r�rr%r0r>r\rbrfrlror�r�r�r�rrr,rCrrrr
s������9�9�9�G�G�G�
B�B�B�;�;�;�8'$�'$�'$�R!�!�!�@'1�'1�'1�R	!�	!�	!�	!�	!�	!����61�1�1�*=�=�=�8)D�)D�)D�V?�?�?�
2�
2�
2�F�F�F�F�Frrc�&�eZdZd�Zd�Zd�Zd�ZdS)�DefaultRootTestc�j�|�tjd��|�tj��tj��}tj��}tj��}|�tj|��|���|�tj|��|���|�tj��|���|�tj��dS)NT)r
r�_support_default_rootrP�
_default_root�Tk�destroy)rr�root2�root3s    r�test_default_rootz!DefaultRootTest.test_default_rootxs����
�
�g�3�T�:�:�:����'�/�0�0�0��z�|�|���
�����
�����
�
�g�+�T�2�2�2�
�
�
�����
�
�g�+�T�2�2�2����������'�/�0�0�0�
�
�
�������'�/�0�0�0�0�0rc���|�tjd��|�tj��tj��}|�tj|��tj��|�tjd��|�ttd����tj��|�tjd��|�ttd����|�	��|�tjd��|�ttd����tj��}|�tjd��|�ttd����|�	��dS)NTFr1)
r
rr0rPr1r2�
NoDefaultRootr,�hasattrr3r=s  r�test_no_default_rootz$DefaultRootTest.test_no_default_root�sm���
�
�g�3�T�:�:�:����'�/�0�0�0��z�|�|���
�
�g�+�T�2�2�2�������
�
�g�3�U�;�;�;������/�:�:�;�;�;�������
�
�g�3�U�;�;�;������/�:�:�;�;�;��������
�
�g�3�U�;�;�;������/�:�:�;�;�;��z�|�|���
�
�g�3�U�;�;�;������/�:�:�;�;�;��������rc��|�ttjd��tj��}|�tjd��d��|�ttjd��|���tj��|�ttjd��dS)NrTr	)	rU�RuntimeErrorrrr2r
rer3r8r=s  rrzDefaultRootTest.test_getboolean�s������,��(:�C�@�@�@��z�|�|���
�
�g�(��-�-�t�4�4�4����*�g�&8�%�@�@�@���������������,��(:�C�@�@�@�@�@rc�h�|�ttj��tj��}|�|j��tj��|���tj��|�ttj��dSrB)	rUr<rrr2r_rr3r8r=s  rrzDefaultRootTest.test_mainloop�s������,��(8�9�9�9��z�|�|������	�"�"�"��������������������,��(8�9�9�9�9�9rN)r�r�r�r6r:rrrCrrr.r.vsS������1�1�1����(A�A�A�:�:�:�:�:rr.�__main__)rW�unittestrr��testr�tkinter.test.supportrr�requires�TestCaserr.r��mainrCrr�<module>rEs������������������������H�H�H�H�H�H�H�H��������iF�iF�iF�iF�iF�~�x�0�iF�iF�iF�X4:�4:�4:�4:�4:�-�x�/@�4:�4:�4:�n�z����H�M�O�O�O�O�O��r