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/idlelib/idle_test/__pycache__/test_help_about.cpython-311.pyc
�

��Vc���h�dZddlmZddlZddlmZmZddlmZm	Z	ddl
mZddlm
Z
ddlmZddlZdd	lmZejZGd
�dej��ZGd�d
ej��ZGd�dej��ZGd�d��ZGd�dej��Zedkrejd���dSdS)z�Test help_about, coverage 100%.
help_about.build_bits branches on sys.platform='darwin'.
'100% combines coverage on Mac and others.
�)�
help_aboutN)�requires�findfile)�Tk�TclError)�Func)�	Mbox_func)�textview)�python_versionc�\�eZdZdZed���Zed���Zd�Zd�Zd�Z	d�Z
d�Zd	S)
�LiveDialogTestzmSimulate user clicking buttons other than [Close].

    Test that invoked textview has text from source.
    c��td��t��|_|j���t	|jdd���|_dS�N�gui�
About IDLET��_utest�rr�root�withdraw�About�dialog��clss �5D:\Python311\Lib\idlelib\idle_test\test_help_about.py�
setUpClasszLiveDialogTest.setUpClass�H��������4�4�����������3�8�\�$�?�?�?��
�
�
�c�r�|`|j���|j���|`dS�N�rr�update_idletasks�destroyrs r�
tearDownClasszLiveDialogTest.tearDownClass�8���J���!�!�#�#�#���������H�H�Hrc�T�|�tj��d��dS)N)�32�64)�assertInr�
build_bits��selfs r�test_build_bitszLiveDialogTest.test_build_bits&s%���
�
�j�+�-�-�|�<�<�<�<�<rc�`�|�|j���d��dS)�Test about dialog titlerN)�assertEqualr�titler+s r�test_dialog_titlez LiveDialogTest.test_dialog_title)s,�������*�*�,�,�l�;�;�;�;�;rc���tj�|jjd��\}}tj�|��\}}|�|d��dS)zTest about dialog logo.�file�idle_48N)�os�path�splitr�
icon_image�splitextr0)r,r7r4�fn�exts     r�test_dialog_logozLiveDialogTest.test_dialog_logo-sX���W�]�]�4�;�#9�&�#A�B�B�
��d��'�"�"�4�(�(���C�����Y�'�'�'�'�'rc	��|j}|jtdf|jtdf|jtdfg}|D�]\}}}|�|���5|���|�	��|j
jjj
j}|j}t!|��dkr|�|dz��|�|d|dd	����|�|d
|dd����|j
���d
d
d
��n#1swxYwY��d
S)z1Test buttons whose commands use printer function.�license�	copyright�credits��name�z full text was not foundr�1.0�1.end�z2.0z2.endN)r�
py_licenser?�py_copyrightr@�
py_creditsrA�subTest�_Printer__setup�invoke�_current_textview�	viewframe�	textframe�text�get�_Printer__lines�len�failr0r#)r,r�button_sources�button�printerrCrR�liness        r�test_printer_buttonsz#LiveDialogTest.test_printer_buttons3s������!�,�g�y�A�!�.�	�;�G�!�,�g�y�A�C��&4�
	3�
	3�!�F�G�T����4��(�(�	
3�	
3��'�'�)�)�)��
�
�����.�8�B�G�K���/���u�:�:��>�A��I�I�d�%?�?�@�@�@�� � ��q��3�3�u�g�+>�+>�?�?�?�� � ��q��3�3�u�g�+>�+>�?�?�?��(�0�0�2�2�2�	
3�	
3�	
3�	
3�	
3�	
3�	
3�	
3�	
3�	
3�	
3����	
3�	
3�	
3�	
3��
	3�
	3s�CD:�:D>	�D>	c
��|j}|jjddf|jjddf|jjddfg}|D�]S\}}}|�|���5|���t
|d�	��}|jjj	j
j}t|d
���5}|�
|������|dd
����|���|�
|������|dd����ddd��n#1swxYwY|j���ddd��n#1swxYwY��UdS)z Test buttons that display files.z
README.txt�readmezNEWS.txt�newszCREDITS.txtrArB�idlelib)�subdirzutf-8)�encodingrErFz3.0z3.endN)rr\�	idle_news�idle_creditsrKrMrrNrOrPrQrR�openr0�readline�stripr#)	r,rrVrW�filenamerCr;rR�fs	         r�test_file_buttonsz LiveDialogTest.test_file_buttonsFs������;�-�|�X�F��;�0�*�f�E��;�3�]�I�N�P��'5�		3�		3�"�F�H�d��,�,�D�,�)�)�
3�
3��
�
�����h�y�9�9�9���.�8�B�G�K���"�w�/�/�/�P�1��$�$�Q�Z�Z�\�\�%7�%7�%9�%9�3�3�u�g�;N�;N�O�O�O��J�J�L�L�L��$�$�Q�Z�Z�\�\�%7�%7�%9�%9�3�3�u�g�;N�;N�O�O�O�P�P�P�P�P�P�P�P�P�P�P����P�P�P�P��(�0�0�2�2�2�
3�
3�
3�
3�
3�
3�
3�
3�
3�
3�
3����
3�
3�
3�
3��		3�		3s8�AE>�%BE�E>�E�E>�E�E>�>F	�F	N)�__name__�
__module__�__qualname__�__doc__�classmethodrr$r-r2r=rZrh�rrr
r
s����������@�@��[�@�����[��=�=�=�<�<�<�(�(�(�3�3�3�&3�3�3�3�3rr
c�D�eZdZdZed���Zed���Zd�ZdS)�DefaultTitleTestzTest default title.c��td��t��|_|j���t	|jd���|_dS)NrTrrrs rrzDefaultTitleTest.setUpClass\sF��������4�4�����������3�8�D�1�1�1��
�
�
rc�r�|`|j���|j���|`dSr r!rs rr$zDefaultTitleTest.tearDownClasscr%rc��|�|j���dt���dt	j���d���dS)r/zAbout IDLE z (z bit)N)r0rr1rrr*r+s rr2z"DefaultTitleTest.test_dialog_titlejsf�������*�*�,�,�=�~�'7�'7�=�=�(�3�5�5�=�=�=�	>�	>�	>�	>�	>rN)rirjrkrlrmrr$r2rnrrrprpYs]���������2�2��[�2�����[��>�>�>�>�>rrpc�D�eZdZdZed���Zed���Zd�ZdS)�	CloseTestz%Simulate user clicking [Close] buttonc��td��t��|_|j���t	|jdd���|_dSrrrs rrzCloseTest.setUpClasstrrc�r�|`|j���|j���|`dSr r!rs rr$zCloseTest.tearDownClass{r%rc�4�|�|j���d��|jj���|�t��5|j���ddd��dS#1swxYwYdS)N�Toplevel)r0r�winfo_class�	button_okrM�assertRaisesrr+s r�
test_closezCloseTest.test_close�s��������0�0�2�2�J�?�?�?����$�$�&�&�&�
�
�
�x�
(�
(�	&�	&��K�#�#�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	&�	&s�&B
�
B�BN)rirjrkrlrmrr$r}rnrrruruqs`������/�/��@�@��[�@�����[��&�&�&�&�&rruc�J�eZdZejZejZejZ	ej
Z
dZdS)�Dummy_about_dialogTN)rirjrkr�show_idle_creditsrb�show_readme�idle_readme�show_idle_newsra�display_file_textrrnrrrr�s4�������*�L��#�K��$�I��/��
�F�F�Frrc�X�eZdZdZe��Zed���Zed���Zd�Z	dS)�DisplayFileTestz�Test functions that display files.

    While somewhat redundant with gui-based test_file_dialog,
    these unit tests run on all buildbots, not just a few.
    c���tj|_tj|_t��|_t��|_|jt_|jt_dSr )	r
�	showerror�
orig_error�	view_text�	orig_viewr	�errorr�viewrs rrzDisplayFileTest.setUpClass�sF��!�+��� �*��
��K�K��	��6�6��� �Y��� �X����rc�J�|jt_|jt_dSr )r�r
r�r�r�rs rr$zDisplayFileTest.tearDownClass�s�� �^��� �]����rc�r�|jj|jj|jjfD]�}d|j_d|j_|�|���5|��|�	|jjd��|�	|jjd��ddd��n#1swxYwY��dS)N�F)�handlerT)
rrbr�rar��messager��calledrKr0)r,r�s  r�test_file_displayz!DisplayFileTest.test_file_display�s�����0���/���-�/�	9�	9�G�"$�D�J��$�D�I�����g��.�.�
9�
9���	�	�	�� � ���!3�R�8�8�8�� � ���!1�4�8�8�8�
9�
9�
9�
9�
9�
9�
9�
9�
9�
9�
9����
9�
9�
9�
9��	9�	9s�AB+�+B/	�2B/	N)
rirjrkrlrrrmrr$r�rnrrr�r��sq��������
 �
�
!�
!�F��&�&��[�&��+�+��[�+�	9�	9�	9�	9�	9rr��__main__rD)�	verbosity)rlr^r�unittest�test.supportrr�tkinterrr�idlelib.idle_test.mock_idler�idlelib.idle_test.mock_tkr	r
�os.pathr6�platformr�AboutDialogr�TestCaser
rprurr�ri�mainrnrr�<module>r�s�����
����������+�+�+�+�+�+�+�+� � � � � � � � �,�,�,�,�,�,�/�/�/�/�/�/�����������#�#�#�#�#�#����C3�C3�C3�C3�C3�X�&�C3�C3�C3�L>�>�>�>�>�x�(�>�>�>�0&�&�&�&�&��!�&�&�&�0��������9�9�9�9�9�h�'�9�9�9�D�z����H�M�A��������r