관리-도구
편집 파일: test_browser.cpython-37.opt-2.pyc
B YI~d � @ s� d dl mZ d dlmZ d dlZd dlmZ d dlmZ d dlm Z d dl Zd dlZd dl mZ d dlmZ G d d � d ej�ZeZd\ZZe�edd ged�Ze�edd�Ze�edddg�Ze�edd�Ze�edd�Ze�eded�Ze�edd�Z e�e dd�Z!e�edd�Z"eed �Z#e�$e#d!� e�$ej%� G d"d#� d#ej�Z&G d$d%� d%ej�Z'G d&d'� d'ej�Z(G d(d)� d)ej�Z)e*d*k�r�ej+d+d,� dS )-� )�browser)�requiresN)�mock)�Func)�deque)�Tk)�TreeNodec @ sD e Zd Zedd� �Zedd� �Zdd� Zdd� Zd d � Zdd� Z d S )�ModuleBrowserTestc C s2 t d� t� | _| j�� tj| jtdd�| _d S )NZguiT)Z_utest)r r �rootZwithdrawr Z ModuleBrowser�__file__�mb)�cls� r �C/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_browser.py� setUpClass s zModuleBrowserTest.setUpClassc C s* | j �� | j�� | j�� | `| ` d S )N)r �closer Zupdate_idletasks�destroy)r r r r � tearDownClass s zModuleBrowserTest.tearDownClassc C sB | j }| j}||jt� |tji � | �|jt� | � t j� d S )N)r �assertEqual�pathr �pyclbrZ_modules�assertIsInstance�noder ZassertIsNotNoner Z file_open)�selfr �eqr r r � test_init! s zModuleBrowserTest.test_initc C s6 | j }| �tj�t�|j�� � | �|j� � d� d S )NzModule Browser) r �assertIn�osr �basenamer �top�titler Ziconname)r r r r r � test_settitle) s zModuleBrowserTest.test_settitlec C s | j }|�� }| �|tj� d S )N)r Zrootnoder r �ModuleBrowserTreeItem)r r Zrnr r r � test_rootnode. s zModuleBrowserTest.test_rootnodec C sR | j }t� |j_t� |j_|�� | �|jjj� | �|jjj� |j`|j`d S )N)r r r r r r � assertTrueZcalled)r r r r r � test_close3 s zModuleBrowserTest.test_closeN) �__name__� __module__�__qualname__�classmethodr r r r! r# r% r r r r r s r )�testztest.py�C0�base� �F1� �C1� � �C2� �F3� �f0� �f1� �f2� �c1� )r+ r7 r* c @ s e Zd Zdd� Zdd� ZdS )�TransformChildrenTestc C s� | j }tj}t|td��}||ttg� ||d jd� ||d jd� t|td��}||d jd� t|td��}||g � d S )Nr* r zC0(base)r- r7 zdifferent name)r r �transform_children�list�mock_pyclbr_treer+ r7 �name)r r � transform�tclr r r �test_transform_module_childrenU s z4TransformChildrenTest.test_transform_module_childrenc C s� | j }tj}t|tj��}||ttg� ||d jd� ||d jd� t|tj��}||d jd� |t|t j��t tg� d S )Nr r. r- zC1())r r r@ rA r+ �childrenr. r0 rC r7 r9 r= )r r rD rE r r r �test_transform_node_childrend s z2TransformChildrenTest.test_transform_node_childrenN)r&