<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    „ f—  ã               @   s>   d Z ddlmZ G dd„ dƒZG dd„ dƒZG dd„ dƒZd	S )
zqMock classes that imitate idlelib modules or classes.

Attributes and methods will be added as needed for tests.
é    )ÚTextc               @   s"   e Zd ZdZddd„Zdd„ ZdS )	Ú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.
    NFc             C   s"   d| _ || _|| _d | _d | _d S )Nr   )ÚcalledÚresultÚreturn_selfÚargsÚkwds)Úselfr   r   © r
   ú@/opt/alt/python37/lib64/python3.7/idlelib/idle_test/mock_idle.pyÚ__init__   s
    zFunc.__init__c             O   sB   |  j d7  _ || _|| _t| jtƒr.| j‚n| jr8| S | jS d S )Né   )r   r   r   Ú
isinstancer   ÚBaseExceptionr   )r	   r   r   r
   r
   r   Ú__call__   s    zFunc.__call__)NF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r
   r
   r
   r   r      s   
r   c               @   s"   e Zd ZdZddd„Zdd„ ZdS )ÚEditorz1Minimally imitate editor.EditorWindow class.
    Nc             C   s   |pt ƒ | _tƒ | _d S )N)r   ÚtextÚUndoDelegatorZundo)r	   ZflistÚfilenameÚkeyÚrootr   r
   r
   r   r   +   s    zEditor.__init__c             C   s    | j  d¡}| j  d¡}||fS )Nz1.0Úend)r   Úindex)r	   ÚfirstZlastr
   r
   r   Úget_selection_indices0   s    zEditor.get_selection_indices)NNNNN)r   r   r   r   r   r   r
   r
   r
   r   r   (   s    
r   c               @   s    e Zd ZdZdd„ Zdd„ ZdS )r   z0Minimally imitate undo.UndoDelegator class.
    c              G   s   d S )Nr
   )r   r
   r
   r   Úundo_block_start:   s    zUndoDelegator.undo_block_startc              G   s   d S )Nr
   )r   r
   r
   r   Úundo_block_stop<   s    zUndoDelegator.undo_block_stopN)r   r   r   r   r   r    r
   r
   r
   r   r   6   s   r   N)r   Zidlelib.idle_test.mock_tkr   r   r   r   r
   r
   r
   r   Ú<module>   s    