+
     Bi                     R    R t ^ RIHt  ! R R4      t ! R R4      t ! R R4      tR# )	zqMock classes that imitate idlelib modules or classes.

Attributes and methods will be added as needed for tests.
)Textc                   4   a  ] tR t^t o RtRR ltR tRtV tR# )Funca2  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                H    ^ V n         Wn        W n        RV n        RV n        R# )    N)calledresultreturn_selfargskwds)selfr   r	   s   &&&2/usr/lib/python3.14/idlelib/idle_test/mock_idle.py__init__Func.__init__   s"    &		    c                    V ;P                   ^,          un         Wn        W n        \        V P                  \
        4      '       d   V P                  hV P                  '       d   V # V P                  # )   )r   r
   r   
isinstancer   BaseExceptionr	   )r   r
   r   s   &*,r   __call__Func.__call__   sP    q		dkk=11++K;;r   )r
   r   r   r   r	   )NF)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     	 	r   r   c                   4   a  ] tR t^(t o RtRR ltR tRtV tR# )Editorz1Minimally imitate editor.EditorWindow class.
    Nc                V    T;'       g    \        4       V n        \        4       V n        R # N)r   textUndoDelegatorundo)r   flistfilenamekeyrootr$   s   &&&&&&r   r   Editor.__init__+   s    NNDF	!O	r   c                t    V P                   P                  R 4      pV P                   P                  R4      pW3# )z1.0end)r$   index)r   firstlasts   &  r   get_selection_indicesEditor.get_selection_indices0   s.    		&yyu%{r   )r$   r&   )NNNNN)	r   r   r   r   r   r   r1   r   r   r   s   @r   r!   r!   (   s     $
 r   r!   c                   0   a  ] tR t^6t o RtR tR tRtV tR# )r%   z0Minimally imitate undo.UndoDelegator class.
    c                     R # r#    r
   s   *r   undo_block_startUndoDelegator.undo_block_start:       r   c                     R # r#   r5   r6   s   *r   undo_block_stopUndoDelegator.undo_block_stop<   r9   r   r5   N)	r   r   r   r   r   r7   r;   r   r   r   s   @r   r%   r%   6   s      r   r%   N)r   idlelib.idle_test.mock_tkr   r   r!   r%   r5   r   r   <module>r>      s.   
 + @  r   