%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/idlelib/idle_test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyo

ó
Pêáac@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((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyt
setUpClasss
cCs|jjƒ|`dS(N(R
tdestroy(R((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyt
tearDownClass s
cCs:tj|jƒ|_tjd|jd|jƒ|_dS(NR
tengine(tseRR
RtsdbRtdialog(tself((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pytsetUp%scCs|jjƒdS(N(Rtclose(R((sC/usr/local/lib/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((sC/usr/local/lib/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((sC/usr/local/lib/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((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_make_entryJs	cCsId|j_|jjdƒ|jjƒ|j|jjjƒdƒdS(NiR(RR/RtsetpatR'R4R!R"(R((sC/usr/local/lib/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((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_make_frame_scCs(t|jƒ|j_d|j_|ƒS(Ni(RR
RRR/(Rtmeth((sC/usr/local/lib/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((sC/usr/local/lib/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((sC/usr/local/lib/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((sC/usr/local/lib/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((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyttest_create_command_buttons™s
(t__name__t
__module__tclassmethodRRRRR&R.R;R=RCRERTR[R`Re(((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyRs											t__main__t	verbosityitexit(t__doc__tunittestttest.test_supportRtTkinterRRRRtidlelibRRRRtidlelib.idle_test.mock_idleRtTestCaseRRftmain(((sC/usr/local/lib/python2.7/idlelib/idle_test/test_searchdialogbase.pyt<module>s"
‹

Zerion Mini Shell 1.0