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__/mock_idle.cpython-312.opt-1.pyc

�

&Μg���P�dZddlmZGd�d�ZGd�d�ZGd�d�Zy	)
zqMock classes that imitate idlelib modules or classes.

Attributes and methods will be added as needed for tests.
�)�Textc��eZdZdZdd�Zd�Zy)�FuncaZRecord call, capture args, return/raise result set by test.

    When mock function is called, set or use attributes:
    self.called - increment call number even if no args, kwds passed.
    self.args - capture positional arguments.
    self.kwds - capture keyword arguments.
    self.result - return or raise value set in __init__.
    self.return_self - return self instead, to mock query class return.

    Most common use will probably be to mock instance methods.
    Given class instance, can set and delete as instance attribute.
    Mock_tk.Var and Mbox_func are special variants of this.
    Nc�J�d|_||_||_d|_d|_y)Nr)�called�result�return_self�args�kwds)�selfrr	s   �8/usr/local/lib/python3.12/idlelib/idle_test/mock_idle.py�__init__z
Func.__init__s&��������&�����	���	�c���|xjdz
c_||_||_t|jt
�r|j�|jr|S|jS)N�)rr
r�
isinstancer�
BaseExceptionr	)rr
rs   r
�__call__z
Func.__call__sN�����q�����	���	��d�k�k�=�1��+�+��
�
�
��K��;�;�r)NF)�__name__�
__module__�__qualname__�__doc__rr�rr
rrs����	rrc�"�eZdZdZ		dd�Zd�Zy)�Editorz1Minimally imitate editor.EditorWindow class.
    Nc�H�|xs
t�|_t�|_y�N)r�text�
UndoDelegator�undo)r�flist�filename�key�rootrs      r
rzEditor.__init__+s���N�D�F��	�!�O��	rc�v�|jjd�}|jjd�}||fS)Nz1.0�end)r�index)r�first�lasts   r
�get_selection_indiceszEditor.get_selection_indices0s0���	�	����&���y�y���u�%���d�{�r)NNNNN)rrrrrr*rrr
rr(s���AE��$�
rrc��eZdZdZd�Zd�Zy)rz0Minimally imitate undo.UndoDelegator class.
    c��yrr�r
s r
�undo_block_startzUndoDelegator.undo_block_start:���rc��yrrr-s r
�undo_block_stopzUndoDelegator.undo_block_stop<r/rN)rrrrr.r1rrr
rr6s���
�
rrN)r�idlelib.idle_test.mock_tkrrrrrrr
�<module>r3s.���
+���@��
�
r

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