Your IP : 3.15.195.84


Current Path : /opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/test_percolator.cpython-35.pyc



��Yf��@s�dZddlmZed�ddlZddlmZmZmZddlm	Z	m
Z
Gdd�de
�ZGd	d
�d
ej�Z
edkr�ejdd
�dS)zTest Percolator�)�requiresZguiN)�Text�Tk�END)�
Percolator�	Delegatorc@saeZdZdd�Zdd�Zdd�Zddd	�Zdd
d�Zddd
�ZdS)�MyFiltercCstj|d�dS)N)r�__init__)�self�r�F/opt/alt/python35/lib64/python3.5/idlelib/idle_test/test_percolator.pyr	szMyFilter.__init__cGs||_|jj|�dS)N)�insert_called_with�delegate�insert)r
�argsrrrrs	zMyFilter.insertcGs||_|jj|�dS)N)�delete_called_withr�delete)r
rrrrrs	zMyFilter.deleteNcCs#|j�}|jj||�dS)N)�upperrr)r
�index�chars�tagsrrr�uppercase_insertszMyFilter.uppercase_insertcCs#|j�}|jj||�dS)N)�lowerrr)r
rrrrrr�lowercase_insertszMyFilter.lowercase_insertcCsdS)Nr)r
rrrrrr�dont_insertszMyFilter.dont_insert)	�__name__�
__module__�__qualname__r	rrrrrrrrrr
src@s�eZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�PercolatorTestcCs"t�|_t|j�|_dS)N)r�rootr�text)�clsrrr�
setUpClass$szPercolatorTest.setUpClasscCs|`|jj�|`dS)N)r rZdestroy)r!rrr�
tearDownClass)s
zPercolatorTest.tearDownClasscCsTt|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.tearDowncCse|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_removefiltercCsL|jjdd�|j|jjdt�d�|j|jjd�dS)Nr�fooz1.0zfoo
)rr1N)r rr+�getr�assertTupleEqualr%r
)r
rrr�test_insertOszPercolatorTest.test_insertcCsH|jj|j_|jjdd�|j|jjdt�d�dS)NrZbArz1.0zBAR
)r%rrr r+r2r)r
rrr�test_modify_insertUsz!PercolatorTest.test_modify_insertcCsst�}|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_insertcCs�|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_insertcCs6|jjdd�|j|jjdd�d�dS)NrZhelloz1.0�endzhello
)r rr+r2)r
rrr�test_without_filterjsz"PercolatorTest.test_without_filtercCs_|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__Ztest.supportrZunittestZtkinterrrrZidlelib.PercolatorrrrZTestCaserr�mainrrrr�<module>s
S

?>