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_editor.cpython-311.pyc
�

��Vc�� �dZddlmZddlZddlmZddlmZddlm	Z	ej
ZGd�dej��Z
Gd	�d
ej��Zd�ZGd�d
ej��ZGd�dej��Zedkrejd���dSdS)zTest editor, coverage 35%.�)�editorN)�
namedtuple)�requires)�Tkc�@�eZdZed���Zed���Zd�ZdS)�EditorWindowTestc�|�td��t��|_|j���dS)N�gui)rr�root�withdraw��clss �1D:\Python311\Lib\idlelib\idle_test\test_editor.py�
setUpClasszEditorWindowTest.setUpClasss2��������4�4������������c���|j���|jj�dd��D]}|j�|���|j���|`dS�N�after�info)r�update_idletasks�tk�call�after_cancel�destroy�r�ids  r�
tearDownClasszEditorWindowTest.tearDownClassso����!�!�#�#�#��(�+�"�"�7�F�3�3�	&�	&�B��H�!�!�"�%�%�%�%���������H�H�Hrc��t|j���}|�|j|j��|���dS)N�r)�Editorr�assertEqual�_close)�self�es  r�	test_initzEditorWindowTest.test_inits?����	�"�"�"���������+�+�+�	���
�
�
�
�
rN)�__name__�
__module__�__qualname__�classmethodrrr%�rrrrsW����������[��
����[������rrc� �eZdZd�Zd�Zd�ZdS)�TestGetLineIndentc	���dD]`}dD][}|�||���5|�tj||���d��ddd��n#1swxYwY�\�adS)N)�����)��
)�line�tabwidth�r6�rr��subTestr!r�get_line_indent)r#r6r5s   r�test_empty_linesz"TestGetLineIndent.test_empty_lines#s���'�	�	�H�"�
�
���\�\�t�h�\�?�?����$�$��.�t�h�G�G�G������������������������
�	�	s�+A�A�Ac���d}|D]]\}}|�|���5|�tj|d���|��ddd��n#1swxYwY�^dS)N)�z	no spacesr8)z    space test)r0r0)�		tab test)r.r0)�		double tabs test)r/r2)z    	mixed test��r2)z  	  mixed test)rBr1)z	    mixed testrA)�
  	mixed test)�r0)�
 	 mixed test)rDrB)�
	  mixed test)rDr1�z
newline testr8�r5r0r7r9�r#�testsr5�expecteds    r�test_tabwidth_4z!TestGetLineIndent.test_tabwidth_4,���-�� $�	�	�N�D�(����4��(�(�
�
�� � ��*�4�!�<�<�<�����
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��	�	��+A�A	�A	c���d}|D]]\}}|�|���5|�tj|d���|��ddd��n#1swxYwY�^dS)N)r>)z        space test)r2r2)r?)r.r2)r@)r/�)z        	mixed test��	rP)z      	  mixed test)rR�
)z	        mixed testrQ)rC)rDr2)rE)rDrR)rF)rDrSrGrHr2r7r9rIs    r�test_tabwidth_8z!TestGetLineIndent.test_tabwidth_8ErMrNN)r&r'r(r<rLrTr*rrr,r,"sA������������2����rr,c��|�dd��|�d|��|���dS)N�1.0�end)�delete�insert�update)�text�strings  rrYrY_s;���K�K��u�����K�K��v�����K�K�M�M�M�M�Mrc�@�eZdZed���Zed���Zd�ZdS)�IndentAndNewlineTestc���td��t��|_|j���t	|j���|_d|j_d|j_dS)Nr
rr/)rrrrr �window�indentwidthr6r
s rrzIndentAndNewlineTest.setUpClassgsZ��������4�4�������������*�*�*��
�!"��
����
���rc��|j���|`|j���|jj�dd��D]}|j�|���|j���|`dSr�r`r"rrrrrrrs  rrz"IndentAndNewlineTest.tearDownClassp����
�������J���!�!�#�#�#��(�+�"�"�7�F�3�3�	&�	&�B��H�!�!�"�%�%�%�%���������H�H�Hrc��|j}|j}|j}|j}|j}tdgd���}|dddd��|ddd	d
��|ddd	d��|d
ddd��|dddd��|dddd��|dddd��|dddd��|dddd��f	}|D]�}|�|j� ��5t||j��|�	d!|j
��|d�"��||d#d$��|j��ddd��n#1swxYwY��t|d%��|�d&d'd��|d��||d#d$��d(��dS))N�Tests)�labelr[rK�markz"Empty line inserts with no indent.z  
  def __init__(self):z
  
  def __init__(self):
z1.endz+Inside bracket before space, deletes space.z  def f1(self, a, b):z  def f1(self,
         a, b):
z1.14z*Inside bracket after space, deletes space.z1.15z(Inside string with one line - no indent.z  """Docstring."""z  """Docstring.
"""
z&Inside string with more than one line.z%  """Docstring.
  Docstring Line 2"""z)  """Docstring.
  Docstring Line 2
  """
z2.18zBackslash with one line.za =\za =\
  
z"Backslash with more than one line.za =\
          multiline\z%a =\
          multiline\
          
z2.endz Block opener - indents +1 level.z  def f1(self):
    passz  def f1(self):
    
    pass
z Block closer - dedents -1 level.z  def f1(self):
    pass
  
)rgrY)�eventrVrWz&  def f1(self, a, b):
    return a + b�selz1.17z-  def f1(self, a,
         
    return a + b
)
r!r`r[�get�newline_and_indent_eventrr:rgrY�mark_setrhrK�tag_add)	r#�eq�wr[rk�nl�TestInforJ�tests	         r�test_indent_and_newline_eventz2IndentAndNewlineTest.test_indent_and_newline_eventzsx��
�
���K���v���h��
�
'���g�'L�'L�'L�M�M����>�5�9�!�#�#���G�1�=� �"�"���F�1�=� �"�"���D�.�2� �"�"���B�B�H� �"�"���4�!�'�!�#�#���>�8�F�!�#�#���<�5�=�!�#�#���<�5�;�!�#�#�A$��L�	5�	5�D����D�J��/�/�
5�
5��t�T�Y�'�'�'��
�
�h��	�2�2�2����������3�3�u�e�$�$�d�m�4�4�4�	
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5����
5�
5�
5�
5��	�t�>�?�?�?����U�F�G�,�,�,�
��4����
��3�3�u�e���P�Q�Q�Q�Q�Qs�AD0�0D4	�7D4	N)r&r'r(r)rrrtr*rrr^r^es\������� � ��[� �����[��;R�;R�;R�;R�;Rrr^c�Z�eZdZed���Zed���ZGd�d��Zd�ZdS)�	RMenuTestc��td��t��|_|j���t	|j���|_dS)Nr
r)rrrrr r`r
s rrzRMenuTest.setUpClass�sD��������4�4�������������*�*�*��
�
�
rc��|j���|`|j���|jj�dd��D]}|j�|���|j���|`dSrrcrs  rrzRMenuTest.tearDownClass�rdrc��eZdZd�ZdS)�RMenuTest.DummyRMenuc��dS�Nr*)�x�ys  r�tk_popupzRMenuTest.DummyRMenu.tk_popup�s���rN)r&r'r(rr*rr�
DummyRMenurz�s������ � � � � rr�c��dSr|r*)r#s r�test_rclickzRMenuTest.test_rclick�s���rN)r&r'r(r)rrr�r�r*rrrvrv�s�������+�+��[�+�����[��!�!�!�!�!�!�!�!�
�
�
�
�
rrv�__main__r/)�	verbosity)�__doc__�idlelibr�unittest�collectionsr�test.supportr�tkinterr�EditorWindowr �TestCaserr,rYr^rvr&�mainr*rr�<module>r�sm��������������"�"�"�"�"�"�!�!�!�!�!�!�������	�	�������x�(����,:�:�:�:�:��)�:�:�:�z���PR�PR�PR�PR�PR�8�,�PR�PR�PR�f
�
�
�
�
��!�
�
�
�4�z����H�M�A��������r