Your IP : 3.137.170.76


Current Path : /opt/alt/python36/lib64/python3.6/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/idlelib/idle_test/__pycache__/test_pathbrowser.cpython-36.pyc

3

� fv	�@s�dZddlmZddlZddlmZddlmZddlZ	ddl
Z
ddlZddlm
Z
ddlZddlmZddlmZGd	d
�d
ej�ZGdd�dej�ZGd
d�dej�Zedkr�ejddd�dS)zTest pathbrowser, coverage 95%.�)�pathbrowserN)�requires)�Tk)�Func)�browser)�TreeNodec@sDeZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
S)�PathBrowserTestcCs0td�t�|_|jj�tj|jdd�|_dS)NZguiT)Z_utest)rr�rootZwithdrawrZPathBrowser�pb)�cls�r�G/opt/alt/python36/lib64/python3.6/idlelib/idle_test/test_pathbrowser.py�
setUpClasss
zPathBrowserTest.setUpClasscCs*|jj�|jj�|jj�|`|`dS)N)r
�closer	Zupdate_idletasks�destroy)rrrr
�
tearDownClasss


zPathBrowserTest.tearDownClasscCsD|j}|j}||j|j�|tji�|j|jt�|j	t
j�dS)N)r
�assertEqualZmasterr	�pyclbrZ_modules�assertIsInstance�noderZassertIsNotNonerZ	file_open)�selfr
�eqrrr
�	test_init"szPathBrowserTest.test_initcCs.|j}|j|jj�d�|j|jj�d�dS)NzPath Browser)r
r�top�titleZiconname)rr
rrr
�
test_settitle*szPathBrowserTest.test_settitlecCs |j}|j�}|j|tj�dS)N)r
Zrootnoderr�PathBrowserTreeItem)rr
Zrnrrr
�
test_rootnode/szPathBrowserTest.test_rootnodecCsR|j}t�|j_t�|j_|j�|j|jjj�|j|jjj�|j`|j`dS)N)r
rrrrrZ
assertTrueZcalled)rr
rrr
�
test_close4s

zPathBrowserTest.test_closeN)
�__name__�
__module__�__qualname__�classmethodrrrrrrrrrr
rsrc@seZdZdd�ZdS)�DirBrowserTreeItemTestcCshtjd�}|j�|jd|j��tjjtjjt	j
��d}|j|j|�d�|j|j|d�d�dS)N�rTz/IconsF)r�DirBrowserTreeItem�
GetSubListr�GetText�os�path�split�abspath�idlelib�__file__Zispackagedir)r�d�dirrrr
�test_DirBrowserTreeItem@s
z.DirBrowserTreeItemTest.test_DirBrowserTreeItemN)rr r!r0rrrr
r#>sr#c@seZdZdd�ZdS)�PathBrowserTreeItemTestcCsPtj�}|j|j�d�|j�}|jt|�ttj��|jt|d�tj	�dS)Nzsys.pathr)
rrrr'r&�len�sysr)�typer%)r�p�subrrr
�test_PathBrowserTreeItemMs
z0PathBrowserTreeItemTest.test_PathBrowserTreeItemN)rr r!r7rrrr
r1Ksr1�__main__�F)�	verbosity�exit)�__doc__r,rZunittestZtest.supportrZtkinterrZos.pathr(rr3Zidlelib.idle_test.mock_idlerrZidlelib.treerZTestCaserr#r1r�mainrrrr
�<module>s ,



?>