관리-도구
편집 파일: test_textview.cpython-34.pyc
� e f7 � @ s� d Z d d l m Z e d � d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d � Z d d � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z e d k r� e j d d � n d S)aM Test the functions and main class method of textView.py. Since all methods and functions create (or destroy) a TextViewer, which is a widget containing multiple widgets, all tests must be gui tests. Using mock Text would not change this. Other mocks are used to retrieve information about calls. The coverage is essentially 100%. � )�requiresZguiN)�Tk)�textView)�Func)�Mboxc C s t � a d S)N)r �root� r r �D/opt/alt/python34/lib64/python3.4/idlelib/idle_test/test_textview.py�setUpModule s r c C s t j � b d S)N)r �destroyr r r r �tearDownModule s r c @ s+ e Z d Z e � Z e � Z e � Z d S)�TVN)�__name__� __module__�__qualname__r � transient�grab_set�wait_windowr r r r r s r c @ s@ e Z d Z d d � Z d d � Z d d � Z d d � Z d S) �TextViewTestc C s+ t j j � t j j � t j j � d S)N)r r �__init__r r )�selfr r r �setUp% s zTextViewTest.setUpc C sY t t d d � } | j t j j � | j t j j � | j t j j � | j � d S)N�Titlez test text)r r � assertTruer �calledr r �Ok)r �viewr r r �test_init_modal* s zTextViewTest.test_init_modalc C s_ t t d d d d �} | j t j j � | j t j j � | j t j j � | j � d S)Nr z test text�modalF)r r ZassertFalser r r r r )r r r r r �test_init_nonmodal1 s zTextViewTest.test_init_nonmodalc C sR t t d d d d �} t � | _ | j � | j | j j � | ` | j d S)Nr z test textr F)r r r r r r r )r r r r r �test_ok8 s zTextViewTest.test_okN)r r r r r r r r r r r r # s r c @ sL e Z d Z e d d � � Z e d d � � Z d d � Z d d � Z d S) �textviewTestc C s t j | _ t t _ d S)N)�tv�tkMessageBox� orig_mboxr )�clsr r r � setUpClassC s ztextviewTest.setUpClassc C s | j t _ | ` d S)N)r$ r"