Your IP : 3.23.103.14


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_percolator.cpython-36.pyc

3

� f��@s~dZddlmZmZddlZddlmZed�ddlmZm	Z	m
Z
Gdd�de�ZGd	d
�d
ej�Z
edkrzejdd
�dS)zTest percolator, coverage 100%.�)�
Percolator�	DelegatorN)�requiresZgui)�Text�Tk�ENDc@sBeZdZdd�Zdd�Zdd�Zddd	�Zdd
d�Zddd
�ZdS)�MyFiltercCstj|d�dS)N)r�__init__)�self�r�F/opt/alt/python36/lib64/python3.6/idlelib/idle_test/test_percolator.pyr	szMyFilter.__init__cGs||_|jj|�dS)N)�insert_called_with�delegate�insert)r
�argsrrrrszMyFilter.insertcGs||_|jj|�dS)N)�delete_called_withr�delete)r
rrrrrszMyFilter.deleteNcCs|j�}|jj||�dS)N)�upperrr)r
�index�chars�tagsrrr�uppercase_insertszMyFilter.uppercase_insertcCs|j�}|jj||�dS)N)�lowerrr)r
rrrrrr�lowercase_insertszMyFilter.lowercase_insertcCsdS)Nr)r
rrrrrr�dont_insertszMyFilter.dont_insert)N)N)N)	�__name__�
__module__�__qualname__r	rrrrrrrrrr
s

rc@steZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�PercolatorTestcCst�|_t|j�|_dS)N)r�rootr�text)�clsrrr�
setUpClass$szPercolatorTest.setUpClasscCs|`|jj�|`dS)N)r rZdestroy)r!rrr�
tearDownClass)s
zPercolatorTest.tearDownClasscCs<t|j�|_t�|_t�|_|jj|j�|jj|j�dS)N)rr �
percolatorr�
filter_one�
filter_two�insertfilter)r
rrr�setUp/s
zPercolatorTest.setUpcCs|jj�|jjdt�dS)Nz1.0)r$�closer rr)r
rrr�tearDown6s
zPercolatorTest.tearDowncCsJ|j|jj�|j|jj|j�|j|jj|j�|j|jj|jj�dS)N)ZassertIsNotNoner%r�assertEqualr$�topr&�bottom)r
rrr�test_insertfilter:sz PercolatorTest.test_insertfiltercCs�t�}|jj|j�|j|jj|j�|j|jj�t�}|jj	|j�|jj	|�|jj|j�|j|jj|�|j|j|j�|j|jj|jj
�|j|jj�dS)N)rr$Zremovefilterr&r+r,r%ZassertIsNonerr'r-)r
�filter_threerrr�test_removefilter@sz PercolatorTest.test_removefiltercCs8|jjdd�|j|jjdt�d�|j|jjd�dS)Nr�fooz1.0zfoo
)rr1N)r rr+�getr�assertTupleEqualr%r
)r
rrr�test_insertOs
zPercolatorTest.test_insertcCs4|jj|j_|jjdd�|j|jjdt�d�dS)NrZbArz1.0zBAR
)r%rrr r+r2r)r
rrr�test_modify_insertUsz!PercolatorTest.test_modify_insertcCsRt�}|jj|�|jj|j_|jj|j_|jjdd�|j	|jj
dt�d�dS)NrZBaRz1.0zbar
)rr$r'r&rrr%rr r+r2r)r
r/rrr�test_modify_chain_insertZsz'PercolatorTest.test_modify_chain_insertcCsd|jj|j_|jjdd�|j|jjdt�d�|jj|j_|jjdd�|j|jjdt�d�dS)Nrzfoo barz1.0�
)r%rrr r+r2r)r
rrr�test_dont_insertbszPercolatorTest.test_dont_insertcCs(|jjdd�|j|jjdd�d�dS)NrZhelloz1.0�endzhello
)r rr+r2)r
rrr�test_without_filterjsz"PercolatorTest.test_without_filtercCsF|jjdd�|jjdd�|j|jjdt�d�|j|jjd�dS)Nrr1�1.0�1.2zo
)r;r<)	r rrr+r2rr3r%r)r
rrr�test_deletens

zPercolatorTest.test_deleteN)rrr�classmethodr"r#r(r*r.r0r4r5r6r8r:r=rrrrr"sr�__main__�)�	verbosity)�__doc__Zidlelib.percolatorrrZunittestZtest.supportrZtkinterrrrrZTestCaserr�mainrrrr�<module>sS

?>