Viewing File: /opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/mock_idle.cpython-35.opt-1.pyc



Yf%@sSdZddlmZGdddZGdddZGdddZd	S)
zqMock classes that imitate idlelib modules or classes.

Attributes and methods will be added as needed for tests.
)Textc@s1eZdZdZdddZddZdS)FuncaMock 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)calledresultargskwds)selfrr	@/opt/alt/python35/lib64/python3.5/idlelib/idle_test/mock_idle.py__init__s			z
Func.__init__cOsDd|_||_||_t|jtr9|jn|jSdS)NT)rrr
isinstancer
BaseException)rrrr	r	r
__call__s			z
Func.__call__)__name__
__module____qualname____doc__rrr	r	r	r
rsrc@s:eZdZdZddddddZddZdS)Editorz7Minimally imitate EditorWindow.EditorWindow class.
    NcCst|_t|_dS)N)rtext
UndoDelegatorZundo)rZflistfilenamekeyrootr	r	r
r&szEditor.__init__cCs.|jjd}|jjd}||fS)Nz1.0end)rindex)rfirstZlastr	r	r
get_selection_indices*szEditor.get_selection_indices)rrrrrrr	r	r	r
r#src@s.eZdZdZddZddZdS)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
Back to Directory File Manager