%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib64/python2.7/test/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyo

�
5}�ac@sddlZddlZddlZddlZddlmZdejfd��YZddd��YZdefd��YZ	d	ejfd
��YZ
de
fd��YZd
e
fd��YZd�Z
d�Ze
e�Zdd�Zd�Zd�Zedkre�ndS(i����N(ttest_supporttTestGetProfilecBs,eZd�Zd�Zd�Zd�ZRS(cCstjd�dS(N(tsyst
setprofiletNone(tself((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytsetUp	scCstjd�dS(N(RRR(R((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttearDownscCs|jtj��dS(N(tassertIsNoneRt
getprofile(R((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt
test_emptyscCs0d�}tj|�|jtj�|�dS(NcWsdS(N((targs((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytfns(RRtassertIsR	(RR((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_setgets	
(t__name__t
__module__RRR
R(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRs			tHookWatchercBs/eZd�Zd�Zdd�Zd�ZRS(cCsg|_g|_dS(N(tframestevents(R((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt__init__s	cCs;|dks$|dks$|dkr7|j||�ndS(Ntcalltreturnt	exception(t	add_event(Rtframeteventtarg((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytcallbackscCs�|dkrtjd�}ny|jj|�}Wn0tk
rft|j�}|jj|�nX|jj||t	|�f�dS(sAdd an event to the log.iN(
RRt	_getframeRtindext
ValueErrortlentappendRtident(RRRtframeno((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR$s
cCsQt|jj�tt�g}d|_g|jD]}|d|kr1|^q1S(sRemove calls to add_event().iN(R"Rtim_funcRRR(Rt
disallowedtitem((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt
get_events1s	N(RRRRRRR'(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRs		
tProfileSimulatorcBsneZd�Zd�Zd�Zd�Zd�Zd�Zied6ed6ed6ed	6ed
6ed6ZRS(cCs#||_g|_tj|�dS(N(ttestcasetstackRR(RR)((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR:s		cCs|j|||�dS(N(tdispatch(RRRR((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?scCs$|jd|�|jj|�dS(NR(RR*R!(RR((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt
trace_callCscCs!|jd|�|jj�dS(NR(RR*tpop(RR((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttrace_returnGscCs|jjd�dS(Ns2the profiler should never receive exception events(R)tfail(RR((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttrace_exceptionKs	cCsdS(N((RR((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt
trace_passOsRRRtc_calltc_returntc_exception(	RRRRR,R.R0R1R+(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR(9s						tTestCaseBasecBseZd�ZRS(cCsQt||j��}||krM|jdtj|�tj|�f�ndS(Ns'Expected events:
%s
Received events:
%s(tcapture_eventstnew_watcherR/tpprinttpformat(RtcallabletexpectedR((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytcheck_events]s	(RRR<(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR5\stProfileHookTestCasecBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(cCst�S(N(R(R((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR7escCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdS(N((tp((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytfisiRR(R"R<(RR?tf_ident((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_simplehs	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?qsiRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_exceptionps	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWnnXdS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?ysiRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_caught_exceptionxs	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWnnXdS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_caught_nested_exception�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_nested_exception�s	c
s�d���fd�}t��}t|�}|j|dd|fdd|fdd|fdd|fdd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�scs4y�|�Wny�|�Wq0q0XnXdS(N((R>(R?(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytg�siRiRi(R"R<(RRFR@tg_ident((R?sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_exception_in_except_clause�s	c	s�d���fd�}t��}t|�}|j|dd|fdd|fdd|fdd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�scs#z�|�Wd|jd�XdS(Nsfalling through(R(R>(R?(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRF�siRiRsfalling through(R"R<(RRFR@RG((R?sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_exception_propagation�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSs"yddWnddnXdS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_raise_twice�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWn
�nXdS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_raise_reraise�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSs
t��dS(N(t	Exception(R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt
test_raise�s	cs
d���fd���fd���fd���fd�}t��}t��}t��}t��}t|�}|j|dd|fdd|fd	d|fd
d|fdd|fdd|fd
d|fd	d|fdd|fdd|fg
�dS(
NcSsdddS(Ng�?i((((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�scs��dS(N(((R?(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRF�scs��dS(N(((RF(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyth�scs��dS(N(((RN(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyti�scs��dS(N((R>(RO(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytj�siRiiiiR(R"R<(RRPR@RGth_identti_identtj_ident((R?RFRNROsA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_distant_exception�s(	cs�d���fd�}t��}t|�}|j|dd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fg�dS(Ncss xtd�D]}|Vq
WdS(Ni(trange(RO((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?�scsx��D]}q
WdS(N((R>RO(R?(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRF�siRiR(R"R<(RRFR@RG((R?sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_generator�s	cs�d���fd�}t��}t|�}|j|dd|fdd|fdd|fdd|fdd|fdd|fdd|fdd|fg�dS(Ncss&xtd�D]}|Vq
Wt�dS(Ni(RUt
StopIteration(RO((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?s	csx��D]}q
WdS(N((R>RO(R?(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRFsiRiR(R"R<(RRFR@RG((R?sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_stop_iterations	(RRR7RARBRCRDRERHRIRJRKRMRTRVRX(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR=ds																	tProfileSimulatorTestCasecBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs
t|�S(N(R((R((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR7scCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdS(N((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRAs	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?'siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyttest_basic_exception&s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWnnXdS(Ng�?i((R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?/siRR(R"R<(RR?R@((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRC.s	cs
d���fd���fd���fd���fd�}t��}t��}t��}t��}t|�}|j|dd|fdd|fd	d|fd
d|fdd|fdd|fd
d|fd	d|fdd|fdd|fg
�dS(
NcSsdddS(Ng�?i((((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR?8scs��dS(N(((R?(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRF:scs��dS(N(((RF(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRN<scs��dS(N(((RN(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRO>scs��dS(N((R>(RO(sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRP@siRiiiiR(R"R<(RRPR@RGRQRRRS((R?RFRNROsA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRT7s(	(RRR7RARZRCRT(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyRYs
					cCs4t|d�r|j}n	|j}|j|jfS(Ntf_code(thasattrR[t	func_codetco_firstlinenotco_name(tfunctiontcode((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR"Ts	cCsy||�WnnXdS(N((R?R>((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytprotect\scCs�|dkrt�}ntj�}tj�z.tj|j�t||�tjd�Wd|rrtj	�nX|j
�dd!S(Nii����(RRtgct	isenabledtdisableRRRRbtenableR'(R:R>told_gc((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyR6cs

cCs#ddl}|jt|��dS(Ni����(R8R6(R:R8((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pytshow_eventstscCstjttt�dS(N(Rtrun_unittestRR=RY(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt	test_mainyst__main__((RcR8RtunittestttestRtTestCaseRRR(R5R=RYR"Rbt
protect_identRR6RhRjR(((sA/opt/plesk/python/2.7/lib64/python2.7/test/test_sys_setprofile.pyt<module>s$ #�:				

Zerion Mini Shell 1.0