Your IP : 18.117.254.177


Current Path : /opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__/mock_idle.cpython-34.pyc

�
e f%�@sSdZddlmZGdd�d�ZGdd�d�ZGdd�d�Zd	S)
zqMock classes that imitate idlelib modules or classes.

Attributes and methods will be added as needed for tests.
�)�Textc@s1eZdZdZddd�Zdd�ZdS)�Funca�Mock function captures args and returns result set by test.

    Attributes:
    self.called - records call even if no args, kwds passed.
    self.result - set by init, returned by call.
    self.args - captures positional arguments.
    self.kwds - captures keyword arguments.

    Most common use will probably be to mock methods.
    Mock_tk.Var and Mbox_func are special variants of this.
    NcCs(d|_||_d|_d|_dS)NF)�called�result�args�kwds)�selfr�r	�@/opt/alt/python34/lib64/python3.4/idlelib/idle_test/mock_idle.py�__init__s			z
Func.__init__cOsDd|_||_||_t|jt�r9|j�n|jSdS)NT)rrr�
isinstancer�
BaseException)rrrr	r	r
�__call__s			z
Func.__call__)�__name__�
__module__�__qualname__�__doc__rrr	r	r	r
rsrc@s:eZdZdZdddddd�Zdd�ZdS)�Editorz7Minimally imitate EditorWindow.EditorWindow class.
    NcCst�|_t�|_dS)N)r�text�
UndoDelegatorZundo)rZflist�filename�key�rootr	r	r
r&szEditor.__init__cCs.|jjd�}|jjd�}||fS)Nz1.0�end)r�index)r�first�lastr	r	r
�get_selection_indices*szEditor.get_selection_indices)rrrrrrr	r	r	r
r#src@s.eZdZdZdd�Zdd�ZdS)rz9Minimally imitate UndoDelegator,UndoDelegator class.
    cGsdS)Nr	)rr	r	r
�undo_block_start4szUndoDelegator.undo_block_startcGsdS)Nr	)rr	r	r
�undo_block_stop6szUndoDelegator.undo_block_stopN)rrrrrrr	r	r	r
r0srN)rZidlelib.idle_test.mock_tkrrrrr	r	r	r
�<module>s

?>