Your IP : 216.73.216.60


Current Path : /opt/alt/python38/lib64/python3.8/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/idlelib/idle_test/__pycache__/test_zzdummy.cpython-38.opt-2.pyc

U

i�fi�@s�ddlmZddlZddlmZddlmZmZddlmZddlm	Z	ddlm
Z
ddlmZejj
Ze	�d	�e	�d	�e	�d	�e	�d	�d
�ZdZGdd
�d
�ZGdd�dej�Zedkr�ejdd�dS)�)�zzdummyN)�requires)�Tk�Text)�mock)�config)�editor)�format�)�mainZ	highlight�keys�
extensionszf
class C1():
    # Class comment.
    def __init__(self, a, b):
        self.a = a
        self.b = b
c@seZdZejjZdd�ZdS)�DummyEditwincCs:||_||_||_t�|�|_t��|j_t��|j_	dS�N)
�root�top�textr	ZFormatRegionZfregionrZMock�undo_block_start�undo_block_stop)�selfrr�r�C/opt/alt/python38/lib64/python3.8/idlelib/idle_test/test_zzdummy.py�__init__ szDummyEditwin.__init__N)�__name__�
__module__�__qualname__rZEditorWindowZget_selection_indicesrrrrrrsrc@sdeZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dS)�ZZDummyTestcCsDtd�t�}|_|��t|j�}|_t||�|_tt	j
_dS)NZgui)rrrZwithdrawrrrr�testcfgr�idleConf�userCfg)�clsrrrrr�
setUpClass+szZZDummyTest.setUpClasscCsNttj_|`|`|j��|jj�	dd�D]}|j�
|�q*|j��|`dS)NZafter�info)�usercfgrrrrrrZupdate_idletasksZtkZcallZafter_cancelZdestroy)r �idrrr�
tearDownClass4s

zZZDummyTest.tearDownClasscCsD|j}|�dt�|j��|j��t�|j�}|_	dtj_
dS)N�1.0�
# ignore #)r�insert�code_sampler�
reset_mockrr�ZzDummyr�zz�ztext)rrr,rrr�setUp>s

zZZDummyTest.setUpcCs|j�dd�|`dS)Nr&�end)r�deleter,�rrrr�tearDownFszZZDummyTest.tearDowncCsRtt|�d���}g}td|�D],}|�|�d�|�d��}|�|�|��q |S)Nr/�z.0z.end)�int�float�index�range�get�append�
startswith)rr�valueZend_line�actual�lineZtxtrrr�
checklinesJszZZDummyTest.checklinescCs,|j}|�|j|j�|�|j|jj�dSr)r,�assertEqualZeditwinrr)rr,rrr�	test_initUszZZDummyTest.test_initcCs@|�|jjd�td�ddd�tj��|�|jjd�dS)Nr'r
r+zz-textZspam)r?r,r-rZ	SetOptionrr+�reloadr1rrr�test_reloadZs
zZZDummyTest.test_reloadcCs�|j}|j}|j}||jjd�dddddddg}|�||j�}|||�|�ddd�||��d�dddddddg}|�||j�}|||�|j��|j	��dS)Nr'F�sel�2.0�4.end�breakT)
r?r,rr-r>�tag_add�
z_in_eventr�assert_called_oncer�r�eqr,rZexpectedr<rrr�test_z_in_event`s


zZZDummyTest.test_z_in_eventcCs�|j}|j}|j}||jjd�|�ddd�|��|j��|j��|�	ddd�|�ddd�||�
�d	�d
dd
d
dd
d
g}|�||j�}|||�|j��|j��dS)Nr'rCrDz5.endr&r/z3.0rErFFT)
r?r,rr-rGrHrr*rZ
tag_remove�z_out_eventr>rIrJrrr�test_z_out_eventts 



zZZDummyTest.test_z_out_eventcCsB|j}|j}|�ddd�|��|��|�|�dd�t�dS)NrCr&zend-1c)r,rrGrHrMr?r8r))rr,rrrr�test_roundtrip�szZZDummyTest.test_roundtripN)rrr�classmethodr!r%r.r2r>r@rBrLrNrOrrrrr)s

	r�__main__�)�	verbosity)ZidlelibrZunittestZtest.supportrZtkinterrrrrrr	rrr#ZIdleUserConfParserrr)rZTestCaserrrrrrr�<module>s$�
n