Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/idlelib/idle_test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/idlelib/idle_test/__pycache__/test_editor.cpython-312.opt-2.pyc

�

&Μg���d�	ddlmZddlZddlmZddlmZddlmZm	Z	ejZGd�dej�Z
Gd�d	ej�Zd
�ZGd�dej�ZGd
�dej�ZGd�dej�Zedk(rej(d��yy)�)�editorN)�
namedtuple)�requires)�Tk�Textc�2�eZdZed��Zed��Zd�Zy)�EditorWindowTestc�l�td�t�|_|jj�y�N�gui)rr�root�withdraw��clss �:/usr/local/lib/python3.12/idlelib/idle_test/test_editor.py�
setUpClasszEditorWindowTest.setUpClasss"������4���������c��|jj�|jjjdd�D]}|jj	|��|jj�|`y�N�after�info)r
�update_idletasks�tk�call�after_cancel�destroy�r�ids  r�
tearDownClasszEditorWindowTest.tearDownClasssX�����!�!�#��(�(�+�+�"�"�7�F�3�B��H�H�!�!�"�%�4��������Hrc��t|j��}|j|j|j�|j�y)N�r
)�Editorr
�assertEqual�_close)�self�es  r�	test_initzEditorWindowTest.test_inits1����	�	�"�����������+�	���
rN)�__name__�
__module__�__qualname__�classmethodrrr'�rrr	r	s-������
����rr	c��eZdZd�Zd�Zd�Zy)�GetLineIndentTestc	��dD]L}dD]E}|j||��5|jtj||��d�ddd��G�Ny#1swY�TxYw)N)�����)��
)�line�tabwidth�r8�rr��subTestr#r�get_line_indent)r%r8r7s   r�test_empty_linesz"GetLineIndentTest.test_empty_lines#sW��'�H�"���\�\�t�h�\�?��$�$��.�.�t�h�G���@�?�#�(�?�?�s�(A�Ac��d}|D]G\}}|j|��5|jtj|d��|�ddd��Iy#1swY�TxYw)N)�z	no spacesr:)z    space test)r2r2)�		tab test)r0r2)�		double tabs test)r1r4)z    	mixed test��r4)z  	  mixed test)rDr3)z	    mixed testrC)�
  	mixed test)�r2)�
 	 mixed test)rFrD)�
	  mixed test)rFr3�z
newline testr:�r7r2r9r;�r%�testsr7�expecteds    r�test_tabwidth_4z!GetLineIndentTest.test_tabwidth_4,�W��-�� $�N�D�(����4��(�� � ��*�*�4�!�<���)�(�$�(�(���(A�A	c��d}|D]G\}}|j|��5|jtj|d��|�ddd��Iy#1swY�TxYw)N)r@)z        space test)r4r4)rA)r0r4)rB)r1�)z        	mixed test��	rR)z      	  mixed test)rT�
)z	        mixed testrS)rE)rFr4)rG)rFrT)rH)rFrUrIrJr4r9r;rKs    r�test_tabwidth_8z!GetLineIndentTest.test_tabwidth_8ErOrPN)r(r)r*r>rNrVr,rrr.r."s����2rr.c�l�|jdd�|jd|�|j�y)N�1.0�end)�delete�insertr)�text�strings  rr[r[_s*���K�K��u���K�K��v�����rc�2�eZdZed��Zed��Zd�Zy)�IndentAndNewlineTestc���td�t�|_|jj�t	|j��|_d|j
_d|j
_y)Nrr!r1)rrr
rr"�window�indentwidthr8rs rrzIndentAndNewlineTest.setUpClassgsJ������4�������������*��
�!"��
�
����
�
�rc�4�|jj�|`|jj�|jjjdd�D]}|jj
|��|jj�|`yr�rar$r
rrrrrrs  rrz"IndentAndNewlineTest.tearDownClassp�m���
�
�����J����!�!�#��(�(�+�+�"�"�7�F�3�B��H�H�!�!�"�%�4��������Hrc���|j}|j}|j}|j}|j}tdgd��}|dddd�|ddd	d
�|ddd	d�|d
ddd�|dddd�|dddd�|dddd�|dddd�|dddd�f	}|D]|}|j
|j� �5t||j�|jd!|j�|d�"�||d#d$�|j�ddd��~t|d%�|jd&d'd�|d�||d#d$�d(�y#1swY��xYw))N�Tests)�labelr\rM�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
  
)rhr[)�eventrXrYz&  def f1(self, a, b):
    return a + b�selz1.17z-  def f1(self, a,
         
    return a + b
)
r#rar\�get�newline_and_indent_eventrr<rhr[�mark_setrirM�tag_add)	r%�eq�wr\rl�nl�TestInforL�tests	         r�test_indent_and_newline_eventz2IndentAndNewlineTest.test_indent_and_newline_eventzs���
�
�
���K�K���v�v���h�h��
�
'�
'���g�'L�M���>�5�9�!�#��G�1�=� �"��F�1�=� �"��D�.�2� �"��B�B�H� �"��4�!�'�!�#��>�8�F�!�#��<�5�=�!�#��<�5�;�!�#�A$��L�D����D�J�J��/��t�T�Y�Y�'��
�
�h��	�	�2�����3�u�e�$�d�m�m�4�	0�/��	�t�>�?����U�F�G�,�
�4��
�3�u�e��P�Q�0�/�s
�AE � E)	N)r(r)r*r+rrrur,rrr_r_es.��� �� �����;Rrr_c�2�eZdZed��Zed��Zd�Zy)�IndentSearcherTestc��td�t�|_|jj�t	|j�|_yr)rrr
rrr\rs rrzIndentSearcherTest.setUpClass�s1������4�������������>��rc�<�|jj�|`y�N)r
rrs rrz IndentSearcherTest.tearDownClass�s���������Hrc��|j}|j}d}|D]a\}}|j|��5t||�tj|�j�}|j
||�ddd��cy#1swY�nxYw)N))r5�NN)z[1,r|)�if 1:
)r}N)zif 1:
  2
  3
)r}z  2
)�code)r\r<r[r�IndentSearcher�runr#)r%r\�searcher�	test_infor~�
expected_pair�actual_pairs       r�
test_searcherz IndentSearcherTest.test_searcher�s|���y�y���I�I���	�$-��D�-����4��(��t�T�"�$�3�3�D�9�=�=�?��� � ��m�<�)�(�$-�(�(�s�AB�B	N)r(r)r*r+rrr�r,rrrwrw�s-���"��"�����
=rrwc�F�eZdZed��Zed��ZGd�d�Zd�Zy)�	RMenuTestc��td�t�|_|jj�t	|j��|_y)Nrr!)rrr
rr"rars rrzRMenuTest.setUpClass�s2������4�������������*��
rc�4�|jj�|`|jj�|jjjdd�D]}|jj
|��|jj�|`yrrdrs  rrzRMenuTest.tearDownClass�rerc��eZdZd�Zy)�RMenuTest.DummyRMenuc��yrzr,)�x�ys  r�tk_popupzRMenuTest.DummyRMenu.tk_popup�s��DrN)r(r)r*r�r,rr�
DummyRMenur��s�� rr�c��yrzr,)r%s r�test_rclickzRMenuTest.test_rclick�s��rN)r(r)r*r+rrr�r�r,rrr�r��s7���+��+�����!�!�
rr��__main__r1)�	verbosity)�idlelibr�unittest�collectionsr�test.supportr�tkinterrr�EditorWindowr"�TestCaser	r.r[r_rwr�r(�mainr,rr�<module>r�s������"�!��	�	�	���x�(�(��,:��)�)�:�z�PR�8�,�,�PR�f=��*�*�=�<
��!�!�
�4�z���H�M�M�A��r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists