AlkantarClanX12

Your IP : 18.188.101.251


Current Path : /opt/alt/python27/lib64/python2.7/idlelib/idle_test/
Upload File :
Current File : //opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyc

�
^
bc@s�dZddlZddlmZddlmZmZddlmZddd��YZ	ddd	��YZ
d
ejfd��YZe
dkr�ejd
d�ndS(sTest idlelib.ParenMatch.i����N(trequires(tTktText(t
ParenMatchtMockcBs,eZd�Zd�Zd�Zd�ZRS(cOs
t|_dS(N(tFalsetcalled(tselftargstkwargs((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyt__init__scOs
t|_dS(N(tTrueR(RRR	((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyt__call__scOs
t|_dS(N(RR(RRR	((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyt
reset_mockscOsdS(N((RRR	((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pytafters(t__name__t
__module__R
RR
R(((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyR
s			tDummyEditwincBseZd�ZRS(cCs(||_d|_d|_t|_dS(Ni(ttexttindentwidthttabwidthRtcontext_use_ps1(RR((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyR
s			(RRR
(((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyRstParenMatchTestcBsSeZed��Zed��Zd�Zd�Zd�Zd�Zd�Z	RS(cCsMtd�t�|_t|j�|_t|j�|_t�|j_dS(Ntgui(	RRtrootRRRteditwinRt
text_frame(tcls((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyt
setUpClass!s

cCs#|`|`|jj�|`dS(N(RRRtdestroy(R((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyt
tearDownClass)s
cCs|jjdd�dS(Ns1.0tend(Rtdelete(R((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyttearDown/scCs�|j}t|j�}|jd�|jdd�|jd�|jd|j��|j|j	dd�d
�|jdd
�|j
�|jd|j��|j|j	dd�d�|j
d�|j|j	dd�d�dS(s:
        Test ParenMatch with 'expression' style.
        t
expressiontinsertsdef foobar(a, btevents<<parenmatch-check-restore>>tparenRs1.10s1.15t)s1.16N(s1.10s1.15((s1.10s1.16(RRRt	set_styleR#tflash_paren_eventtassertInt
event_infotassertTupleEqualt
tag_prevranget
restore_eventtassertNotIntassertEqualtparen_closed_event(RRtpm((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyttest_paren_expression2s	



cCs�|j}t|j�}|jd�|jdd�|jd�|jd|j��|j|j	dd�d�|jdd
�|j
�|jd|j��|j|j	dd�d
�dS(s7
        Test ParenMatch with 'default' style.
        tdefaultR#sdef foobar(a, bR$s<<parenmatch-check-restore>>R%Rs1.10s1.11R&N(s1.10s1.11((
RRRR'R#R(R)R*R+R,R-R.R/(RRR1((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyttest_paren_defaultIs	


cCs�|j}t|j�}|jdd�|j|jd��|jdd�|j|jd��|j|jd��|jdd�|j|jd��dS(s�
        Test corner cases in flash_paren_event and paren_closed_event.

        These cases force conditional expression and alternate paths.
        R#s# this is a commen)R$s
defs	 a, *arg)N(RRRR#tassertIsNoneR0R((RRR1((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyttest_paren_corner[s	cCslt|j�}t�|_|jd�|j|jj�|jj�|jd�|j|jj�dS(Nii(	RRRR-thandle_restore_timert
assertTrueRR
tassertFalse(RR1((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyttest_handle_restore_timerns


(
RRtclassmethodRRR!R2R4R6R:(((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyRs				t__main__t	verbosityi(((t__doc__tunittestttest.test_supportRtTkinterRRtidlelib.ParenMatchRRRtTestCaseRRtmain(((sF/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_parenmatch.pyt<module>s
Y