HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/idlelib/idle_test/__pycache__/test_zzdummy.cpython-310.pyc
o

�ig�@s�dZddlmZddlZddlmZddlmZmZddlm	Z	ddlm
Z
ddlmZdd	lmZej
jZe
�d
�e
�d
�e
�d
�e
�d
�d�ZdZGd
d�d�ZGdd�dej�Zedkrgejdd�dSdS)zTest zzdummy, coverage 100%.�)�zzdummyN)�requires)�Tk�Text)�mock)�config)�editor)�format�)�mainZ	highlight�keys�
extensionszd
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�;/usr/local/lib/python3.10/idlelib/idle_test/test_zzdummy.py�__init__ szDummyEditwin.__init__N)�__name__�
__module__�__qualname__rZEditorWindowZget_selection_indicesrrrrrrsrc@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_idletasksZtk�callZ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)Nr0�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,�reloadr2rrr�test_reloadZs
zZZDummyTest.test_reloadcCs�|j}|j}|j}||jjd�gd�}|�||j�}|||�|�ddd�||��d�gd�}|�||j�}|||�|j��|j	��dS)Nr()FFFFFFF�sel�2.0�4.end�break)FTTTFFF)
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	�gd
�}|�||j�}|||�|j��|j��dS)Nr(rDrEz5.endr'r0z3.0rFrG)FTFFTFF)
r@r-rr.rHrIrr+rZ
tag_remove�z_out_eventr?rJrKrrr�test_z_out_eventts 



zZZDummyTest.test_z_out_eventcCsB|j}|j}|�ddd�|��|��|�|�dd�t�dS)NrDr'zend-1c)r-rrHrIrNr@r9r*)rr-rrrr�test_roundtrip�szZZDummyTest.test_roundtripN)rrr�classmethodr!r&r/r3r?rArCrMrOrPrrrrr)s

	r�__main__�)�	verbosity)�__doc__ZidlelibrZunittestZtest.supportr�tkinterrrrrrr	rrr#ZIdleUserConfParserrr*rZTestCaserrrrrrr�<module>s*�
n�