Hacked By AnonymousFox

Current Path : /lib64/python2.7/idlelib/idle_test/
Upload File :
Current File : //lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyc

�
{fc@s�dZddlZddlmZddlmZmZmZmZddl	m
Zddl	mZ
ddlmZdejfd	��YZed
kr�ejddd
d�ndS(s�Unittests for idlelib/SearchDialogBase.py

Coverage: 99%. The only thing not covered is inconsequential --
testing skipping of suite when self.needwrapbutton is false.

i����N(trequires(tTexttTktTopleveltFrame(tSearchEngine(tSearchDialogBase(tFunctSearchDialogBaseTestcBs�eZed��Zed��Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�ZRS(cCstd�t�|_dS(Ntgui(RRtroot(tcls((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyt
setUpClasss
cCs|jj�|`dS(N(R
tdestroy(R((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyt
tearDownClass s
cCs:tj|j�|_tjd|jd|j�|_dS(NR
tengine(tseRR
RtsdbRtdialog(tself((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pytsetUp%scCs|jj�dS(N(Rtclose(R((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttearDown)scCs�d|j_t|j�}t|�}|jj|�|j|jjj	�d�|jj
�|j|jjj	�d�|jj|dd�|j|jjj�d�|j
�|j�dS(Ntnormalt	withdrawntsearchphrasethello(tNoneRtdefault_commandRR
RtopentassertEqualttoptstateRtenttgettupdate_idletasksR
(Rttoplevelttext((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_open_and_close,s

cCs�t�|j_t�|j_t�|j_t�|j_d|j_|jj�|j	|jjj
�|j	|jjj
�|j	|jjj
�|j	|jjj
�dS(N(RRtcreate_entriestcreate_option_buttonstcreate_other_buttonstcreate_command_buttonsRRtcreate_widgetst
assertTruetcalled(R((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_create_widgets<s
cCs�|j}d|j_t|j�|j_|jjdd�\}}||dd�|j|j�d�|j	�}|t
|d�d�|t
|d�d�|t
|d�d�|t
|d	�d�||jjd�dS(
NisTest:RR%trowtcolumnitrowspant
columnspan(RRR/RR
Rt
make_entrytassertInR"t	grid_infotint(Rtequaltentrytlabeltegi((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_make_entryJs	cCsId|j_|jjd�|jj�|j|jjj�d�dS(NiR(RR/RtsetpatR'R4R!R"(R((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_create_entriesYs
cCs�d|j_t|j�|j_|jj�\}}|j|d�|j|t�|jjd�\}}|j|dd�|j|t�dS(Nitt	testlabelR%(	RR/RR
Rt
make_frameRtassertIsInstanceR(RtframeR9((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_make_frame_scCs(t|j�|j_d|j_|�S(Ni(RR
RRR/(Rtmeth((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pytbtn_test_setupjsc	Cs|j}x�dD]�}x3|j|j|j|jfD]}|j|�q5W|j|jj�\}}x�t	||j
��D]\}}|\}}|j|d|�|j|j�|�|dkr�|j
�n
|j�|j|j�d|�q}WqWdS(NiiR%(ii(RtrevartcasevartwordvartwrapvartsetRERR(tziptpack_slavesRR"tdeselecttselect(	RteR tvarRBtoptionstspectbuttonR9((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_create_option_buttonsos	
%"

c
Csx	ttfD]�}|jj}|j|�|j|jj�\}}|j�}x�t	||�D]�\}}|\}}	|j
|d|	�||krc|j
|j�|�||j�|j
|j�d|�|d|j�|j
|j�|�qcqcWq
WdS(NR%i(
tFalsetTrueRtbackvarRJRERR)RLRKRR"RN(
RR RPRBtotherstbuttonsRRRStvalR9((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_create_other_buttons�s
cCs`t|j�|j_t|jj�|j_|jjd|jj�}|j|dd�dS(NtTestR%(	RR
RRRtbuttonframetmake_buttonRR(Rtbtn((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_make_button�scCsa|jj�d}x7|jjj�D]#}|ddkr&|d}q&q&W|jd|�dS(NR>R%Rtcommand(RR*R]twinfo_childrenR4(Rtclosebuttoncommandtchild((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_create_command_buttons�s
(t__name__t
__module__tclassmethodRRRRR&R.R;R=RCRERTR[R`Re(((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyRs											t__main__t	verbosityitexit(t__doc__tunittestttest.test_supportRtTkinterRRRRtidlelibRRRRtidlelib.idle_test.mock_idleRtTestCaseRRftmain(((s?/usr/lib64/python2.7/idlelib/idle_test/test_searchdialogbase.pyt<module>s"
�

Hacked By AnonymousFox1.0, Coded By AnonymousFox