Your IP : 18.117.254.177
�
e f% � @ sS d Z d d l m Z Gd d � d � Z Gd d � d � Z Gd d � d � Z d S)
zqMock classes that imitate idlelib modules or classes.
Attributes and methods will be added as needed for tests.
� )�Textc @ s1 e Z d Z d Z d d d � Z d d � Z d S)�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.
Nc C s( d | _ | | _ d | _ d | _ d S)NF)�called�result�args�kwds)�selfr � r �@/opt/alt/python34/lib64/python3.4/idlelib/idle_test/mock_idle.py�__init__ s z
Func.__init__c O sD d | _ | | _ | | _ t | j t � r9 | j � n | j Sd S)NT)r r r �
isinstancer �
BaseException)r r r r r r
�__call__ s z
Func.__call__)�__name__�
__module__�__qualname__�__doc__r r r r r r
r s r c @ s: e Z d Z d Z d d d d d d � Z d d � Z d S)�Editorz7Minimally imitate EditorWindow.EditorWindow class.
Nc C s t � | _ t � | _ d S)N)r �text�
UndoDelegatorZundo)r Zflist�filename�key�rootr r r
r &