관리-도구
편집 파일: test_browser.cpython-36.pyc
3 � f2 � @ s� d Z ddlmZ ddlmZ ddlZddlmZ ddlmZ ddl m Z ddlZddlm Z dd lmZ dd lmZ G dd� dej�ZeZd.\ZZejeded�Zejedd�Zejedd�Zejedd�Zejeddged�Z eje dd�Z!eje dddg�Z"eje"dd �Z#eje#d!d"�Z$ee d#�Z%ej&e%d � ej&e j'� 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-dd-� dS )/zTest browser, coverage 90%.� )�browser)�requiresN)�mock)�Func)�deque)�_pyclbr)�Tk)�TreeNodec @ sD e Zd Zedd� �Zedd� �Zdd� Zdd� Zd d � Zdd� Z d S )�ModuleBrowserTestc C s2 t d� t� | _| jj� tj| jtdd�| _d S )NZguiT)Z_utest)r r �rootZwithdrawr Z ModuleBrowser�__file__�mb)�cls� r �C/opt/alt/python36/lib64/python3.6/idlelib/idle_test/test_browser.py� setUpClass s zModuleBrowserTest.setUpClassc C s* | j j� | jj� | jj� | `| ` d S )N)r �closer Zupdate_idletasks�destroy)r r r r � tearDownClass s zModuleBrowserTest.tearDownClassc C sB | j }| j}||jt� |tji � | j|jt� | j 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 }| jtjjt�|jj� � | j|jj � 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 }|j� }| 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_|j� | j|jjj� | j|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"