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__/mock_idle.cpython-311.pyc
�

��Vc���d�dZddlmZGd�d��ZGd�d��ZGd�d��Zd	S)
zqMock classes that imitate idlelib modules or classes.

Attributes and methods will be added as needed for tests.
�)�Textc� �eZdZdZdd�Zd�ZdS)�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.
    NFc�L�d|_||_||_d|_d|_dS)Nr)�called�result�return_self�args�kwds)�selfrr	s   �/D:\Python311\Lib\idlelib\idle_test\mock_idle.py�__init__z
Func.__init__s*��������&�����	���	�	�	�c��|xjdz
c_||_||_t|jt
��r|j�|jr|S|jS)N�)rr
r�
isinstancer�
BaseExceptionr	)rr
rs   r
�__call__z
Func.__call__sT�����q������	���	��d�k�=�1�1�	��+��
�
�	��K��;�r)NF)�__name__�
__module__�__qualname__�__doc__rr�rr
rrsA������������	�	�	�	�	rrc�$�eZdZdZ		dd�Zd�ZdS)�Editorz1Minimally imitate editor.EditorWindow class.
    Nc�V�|p
t��|_t��|_dS�N)r�text�
UndoDelegator�undo)r�flist�filename�key�rootrs      r
rzEditor.__init__+s ���N�D�F�F��	�!�O�O��	�	�	rc�r�|j�d��}|j�d��}||fS)Nz1.0�end)r�index)r�first�lasts   r
�get_selection_indiceszEditor.get_selection_indices0s2���	����&�&���y���u�%�%���d�{�r)NNNNN)rrrrrr*rrr
rr(sG��������AE��$�$�$�$�
����rrc��eZdZdZd�Zd�ZdS)rz0Minimally imitate undo.UndoDelegator class.
    c��dSrr�r
s r
�undo_block_startzUndoDelegator.undo_block_start:����rc��dSrrr-s r
�undo_block_stopzUndoDelegator.undo_block_stop<r/rN)rrrrr.r1rrr
rr6s<��������
�
�
�
�
�
�
�
rrN)r�idlelib.idle_test.mock_tkrrrrrrr
�<module>r3s�����
+�*�*�*�*�*���������@��������
�
�
�
�
�
�
�
�
�
r