KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib/python2.4/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib/python2.4/test/test_profilehooks.pyc
mò
‚=5Dc@sîdkZdkZdkZdklZdfd„ƒYZdefd„ƒYZdeifd„ƒYZdefd	„ƒYZ	d
efd„ƒYZ
d„Zd
„ZeeƒZ
dd„Zd„Zd„ZedjoeƒndS(N(stest_supporttHookWatchercBs/tZd„Zd„Zdd„Zd„ZRS(NcCsg|_g|_dS(N(tselftframestevents(R((t,/usr/lib/python2.4/test/test_profilehooks.pyt__init__	s	cCs?|djp|djp
|djo|i||ƒndS(Ntcalltreturnt	exception(teventRt	add_eventtframe(RRR	targ((Rtcallback
s'cCsŽ|djotidƒ}ny|ii|ƒ}Wn2tj
o&t	|iƒ}|ii
|ƒnX|ii
||t
|ƒfƒdS(sAdd an event to the log.iN(RtNonetsyst	_getframeRRtindextframenot
ValueErrortlentappendRR	tident(RR	RR((RR
s
cCs^t|iiƒttƒg}d|_g}|iD]"}|d|jo||q5q5~S(sRemove calls to add_event().iN(
RRR
tim_funct
disallowedRRt_[1]Rtitem(RRRR((Rt
get_events s	(t__name__t
__module__RR
RR
R(((RRs		
tProfileSimulatorcBsztZd„Zd„Zd„Zd„Zd„Zd„Zhde<de<d	e<d
e<de<de<ZRS(
NcCs#||_g|_ti|ƒdS(N(ttestcaseRtstackRR(RR((RR)s		cCs|i|||ƒdS(N(RtdispatchR	R(RRR	R((RR
.scCs$|id|ƒ|ii|ƒdS(NR(RR
RR R(RR((Rt
trace_call2scCs!|id|ƒ|iiƒdS(NR(RR
RR tpop(RR((Rttrace_return6scCs|iidƒdS(Ns2the profiler should never receive exception events(RRtfail(RR((Rttrace_exception:scCsdS(N((RR((Rt
trace_pass>sRRRtc_calltc_returntc_exception(	RRRR
R"R$R&R'R!(((RR(s						tTestCaseBasecBstZd„ZRS(NcCsSt||iƒƒ}||jo-|idti|ƒti|ƒfƒndS(Ns'Expected events:
%s
Received events:
%s(	tcapture_eventstcallableRtnew_watcherRtexpectedR%tpprinttpformat(RR-R/R((Rtcheck_eventsLs
(RRR2(((RR+KstProfileHookTestCasecBs†tZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„Zd„Zd„Z
d
„Zd„ZRS(NcCstƒS(N(R(R((RR.TscCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsdS(N((tp((RtfXsiRR(R5Rtf_identRR2(RR6R5((Rttest_simpleWs	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsdddS(Nii((R4((RR5`siRR(R5RR6RR2(RR6R5((Rttest_exception_s	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsyddWnnXdS(Nii((R4((RR5hsiRR(R5RR6RR2(RR6R5((Rttest_caught_exceptiongs	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsyddWnnXdS(Nii((R4((RR5qsiRR(R5RR6RR2(RR6R5((Rttest_caught_nested_exceptionps	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsdddS(Nii((R4((RR5zsiRR(R5RR6RR2(RR6R5((Rttest_nested_exceptionys	cs‰d„‰‡d†}tˆƒ}t|ƒ}|i|dd|fdd|fdd|fdd|fdd|fdd|fgƒdS(NcCsdddS(Nii((R4((RR5…scs4yˆ|ƒWnyˆ|ƒWq0q0XnXdS(N(R5R4(R4(R5(Rtg‡siRiRi(R5R<RR6tg_identRR2(RR<R=R5R6((R5Rttest_exception_in_except_clause„s
	c
s}d„‰‡d†}tˆƒ}t|ƒ}|i|dd|fdd|fdd|fdd|fdd|fgƒdS(NcCsdddS(Nii((R4((RR5˜scs#zˆ|ƒWd|idƒXdS(Nsfalling through(R5R4R
(R4(R5(RR<šsiRiRsfalling through(R5R<RR6R=RR2(RR<R=R5R6((R5Rttest_exception_propogation—s
	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCs"yddWnddnXdS(Nii((R4((RR5§siRR(R5RR6RR2(RR6R5((Rttest_raise_twice¦s	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsyddWn
‚nXdS(Nii((R4((RR5°siRR(R5RR6RR2(RR6R5((Rttest_raise_reraise¯s	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCs
tƒ‚dS(N(t	Exception(R4((RR5¹siRR(R5RR6RR2(RR6R5((Rt
test_raise¸s	csd„‰‡d†‰‡d†‰‡d†‰‡d†}tˆƒ}	tˆƒ}tˆƒ}tˆƒ}t|ƒ}
|i|dd|
fdd|fd	d|fd
d|fdd|	fdd|	fd
d|fd	d|fdd|fdd|
fg
ƒdS(
NcCsdddS(Nii((((RR5ÁscsˆƒdS(N(R5((R5(RR<ÃscsˆƒdS(N(R<((R<(RthÅscsˆƒdS(N(RD((RD(RtiÇscsˆƒdS(N(RE(R4(RE(RtjÉsiRiiiiR(
R5R<RDRERFRR6R=th_identti_identtj_identRR2(RR=RGR<R5RERDRFRHR6RI((R<R5RERDRttest_distant_exceptionÀs	c
s¡d„‰‡d†}tˆƒ}t|ƒ}|i|dd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fgƒdS(NccsxtdƒD]
}|Vq
WdS(Ni(trangeRE(RE((RR5Ýs
csxˆƒD]}q
WdS(N(R5RE(R4RE(R5(RR<às
iRiR(R5R<RR6R=RR2(RR<R=R5R6((R5Rttest_generatorÜs
	c
s¡d„‰‡d†}tˆƒ}t|ƒ}|i|dd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fgƒdS(Nccs%xtdƒD]
}|Vq
Wt‚dS(Ni(RKREt
StopIteration(RE((RR5ós
csxˆƒD]}q
WdS(N(R5RE(R4RE(R5(RR<÷s
iRiR(R5R<RR6R=RR2(RR<R=R5R6((R5Rttest_stop_iterationòs
	(RRR.R7R8R9R:R;R>R?R@RARCRJRLRN(((RR3Ss																	tProfileSimulatorTestCasecBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCs
t|ƒS(N(RR(R((RR.
scCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsdS(N((R4((RR5siRR(R5RR6RR2(RR6R5((RR7
s	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsdddS(Nii((R4((RR5siRR(R5RR6RR2(RR6R5((Rttest_basic_exceptions	cCsAd„}t|ƒ}|i|dd|fdd|fgƒdS(NcCsyddWnnXdS(Nii((R4((RR5siRR(R5RR6RR2(RR6R5((RR9s	csd„‰‡d†‰‡d†‰‡d†‰‡d†}tˆƒ}	tˆƒ}tˆƒ}tˆƒ}t|ƒ}
|i|dd|
fdd|fd	d|fd
d|fdd|	fdd|	fd
d|fd	d|fdd|fdd|
fg
ƒdS(
NcCsdddS(Nii((((RR5'scsˆƒdS(N(R5((R5(RR<)scsˆƒdS(N(R<((R<(RRD+scsˆƒdS(N(RD((RD(RRE-scsˆƒdS(N(RE(R4(RE(RRF/siRiiiiR(
R5R<RDRERFRR6R=RGRHRIRR2(RR=RGR<R5RERDRFRHR6RI((R<R5RERDRRJ&s	(RRR.R7RPR9RJ(((RRO	s
					cCs6t|dƒo
|i}n
|i}|i|ifS(Ntf_code(thasattrtfunctionRQtcodet	func_codetco_firstlinenotco_name(RSRT((RRCs
	cCsy||ƒWnnXdS(N(R5R4(R5R4((RtprotectKscCsˆytiƒWntj
onXtidƒ‚|djo
tƒ}nti|iƒt	||ƒtidƒ|iƒdd!S(Ns(sys.setprofile() did not raise TypeErroriiÿÿÿÿ(Rt
setprofilet	TypeErrorttest_supportt
TestFailedR4RRR
RXR-R(R-R4((RR,Rs



cCs dk}|it|ƒƒdS(N(R0R,R-(R-R0((Rtshow_eventscs	cCstittƒdS(N(R[trun_unittestR3RO(((Rt	test_mainhs	t__main__(R0RtunittestttestR[RRtTestCaseR+R3RORRXt
protect_identRR,R]R_R(R[RRXR+R]R3R,RaR0RRR_RORdR((Rt?s 			
 #¶:				


Anon7 - 2021