Ë
    #´˜j—  ã                   óP   — d Z ddlmZ  G d„ d«      Z G d„ d«      Z G d„ d«      Zy	)
zqMock classes that imitate idlelib modules or classes.

Attributes and methods will be added as needed for tests.
é    )ÚTextc                   ó   — e Zd ZdZdd„Zd„ Zy)ÚFuncaZ  Record 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)Úselfr   r	   s      ú-lib/python3.12/idlelib/idle_test/mock_idle.pyÚ__init__zFunc.__init__   s&   € ØˆŒØˆŒØ&ˆÔØˆŒ	Øˆ�	ó    c                 óÈ   — | xj                   dz  c_         || _        || _        t        | j                  t
        «      r| j                  ‚| j                  r| S | j                  S )Né   )r   r
   r   Ú
isinstancer   ÚBaseExceptionr	   )r   r
   r   s      r   Ú__call__zFunc.__call__   sN   € Ø�Š�qÑ�ØˆŒ	ØˆŒ	Ü�d—k‘k¤=Ô1Ø—+‘+ÐØ×ÒØˆKà—;‘;Ðr   )NF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   © r   r   r   r      s   „ ñóó	r   r   c                   ó"   — e Zd ZdZ	 	 dd„Zd„ Zy)ÚEditorz1Minimally imitate editor.EditorWindow class.
    Nc                 óH   — |xs
 t        «       | _        t        «       | _        y ©N)r   ÚtextÚUndoDelegatorÚundo)r   ÚflistÚfilenameÚkeyÚrootr   s         r   r   zEditor.__init__+   s   € à’NœD›FˆŒ	Ü!“Oˆ�	r   c                 óv   — | j                   j                  d«      }| j                   j                  d«      }||fS )Nz1.0Úend)r   Úindex)r   ÚfirstÚlasts      r   Úget_selection_indiceszEditor.get_selection_indices0   s0   € Ø—	‘	—‘ Ó&ˆØ�y‰y�‰˜uÓ%ˆØ�dˆ{Ðr   )NNNNN)r   r   r   r   r   r*   r   r   r   r   r   (   s   „ ñàAEØó$ó
r   r   c                   ó   — e Zd ZdZd„ Zd„ Zy)r   z0Minimally imitate undo.UndoDelegator class.
    c                   ó   — y r   r   ©r
   s    r   Úundo_block_startzUndoDelegator.undo_block_start:   ó   € Ør   c                   ó   — y r   r   r-   s    r   Úundo_block_stopzUndoDelegator.undo_block_stop<   r/   r   N)r   r   r   r   r.   r1   r   r   r   r   r   6   s   „ ñòór   r   N)r   Úidlelib.idle_test.mock_tkr   r   r   r   r   r   r   Ú<module>r3      s.   ðñõ
 +÷ñ ÷@ñ ÷ò r   