관리-도구
편집 파일: mock_tk.cpython-37.pyc
B � fk- � @ sh d Z G dd� d�ZG dd� d�ZG dd� d�ZG dd� d�Zd d lmZ G dd� d�ZG d d� d�ZdS )z�Classes that replace tkinter gui objects used by an object being tested. A gui object is anything with a master or parent parameter, which is typically required in spite of what the doc strings say. c @ s e Zd ZdZdd� ZdS )�Eventa� Minimal mock with attributes for testing event handlers. This is not a gui object, but is used as an argument for callbacks that access attributes of the event passed. If a callback ignores the event, other than the fact that is happened, pass 'event'. Keyboard, mouse, window, and other sources generate Event instances. Event instances have the following attributes: serial (number of event), time (of event), type (of event as number), widget (in which event occurred), and x,y (position of mouse). There are other attributes for specific events, such as keycode for key events. tkinter.Event.__doc__ has more but is still not complete. c K s | j �|� dS )z,Create event with attributes needed for testN)�__dict__�update)�self�kwds� r �>/opt/alt/python37/lib64/python3.7/idlelib/idle_test/mock_tk.py�__init__ s zEvent.__init__N)�__name__� __module__�__qualname__�__doc__r r r r r r s r c @ s* e Zd ZdZd dd�Zdd� Zdd� ZdS ) �Varz)Use for String/Int/BooleanVar: incompleteNc C s || _ || _|| _d S )N)�master�value�name)r r r r r r r r s zVar.__init__c C s || _ d S )N)r )r r r r r �set s zVar.setc C s | j S )N)r )r r r r �get! s zVar.get)NNN)r r r r r r r r r r r r s r c @ s"