Current File : //opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyo
�
��Wc@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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pytsetUp	scCstjd�dS(N(RRR(R((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttearDownscCs|jtj��dS(N(tassertIsNoneRt
getprofile(R((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyt
test_emptyscCs0d�}tj|�|jtj�|�dS(NcWsdS(N((targs((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pytfns(RRtassertIsR	(RR((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_setgets	
(t__name__t
__module__RRR
R(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRs			tHookWatchercBs/eZd�Zd�Zdd�Zd�ZRS(cCsg|_g|_dS(N(tframestevents(R((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyt__init__s	cCs;|dks$|dks$|dkr7|j||�ndS(Ntcalltreturnt	exception(t	add_event(Rtframeteventtarg((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyt
get_events1s	N(RRRRRRR'(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRs		
tProfileSimulatorcBsneZd�Zd�Zd�Zd�Zd�Zd�Zied6ed6ed6ed	6ed
6ed6ZRS(cCs#||_g|_tj|�dS(N(ttestcasetstackRR(RR)((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR:s		cCs|j|||�dS(N(tdispatch(RRRR((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?scCs$|jd|�|jj|�dS(NR(RR*R!(RR((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyt
trace_callCscCs!|jd|�|jj�dS(NR(RR*tpop(RR((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttrace_returnGscCs|jjd�dS(Ns2the profiler should never receive exception events(R)tfail(RR((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttrace_exceptionKs	cCsdS(N((RR((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyt
trace_passOsRRRtc_calltc_returntc_exception(	RRRRR,R.R0R1R+(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pytcheck_events]s	(RRR<(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR7escCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdS(N((tp((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pytfisiRR(R"R<(RR?tf_ident((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_simplehs	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?qsiRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_exceptionps	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWnnXdS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?ysiRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_caught_exceptionxs	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWnnXdS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_caught_nested_exception�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�scs4y�|�Wny�|�Wq0q0XnXdS(N((R>(R?(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pytg�siRiRi(R"R<(RRFR@tg_ident((R?sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�scs#z�|�Wd|jd�XdS(Nsfalling through(R(R>(R?(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRF�siRiRsfalling through(R"R<(RRFR@RG((R?sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_exception_propagation�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSs"yddWnddnXdS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_raise_twice�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWn
�nXdS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_raise_reraise�s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSs
t��dS(N(t	Exception(R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�scs��dS(N(((R?(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRF�scs��dS(N(((RF(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyth�scs��dS(N(((RN(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyti�scs��dS(N((R>(RO(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pytj�siRiiiiR(R"R<(RRPR@RGth_identti_identtj_ident((R?RFRNROsq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?�scsx��D]}q
WdS(N((R>RO(R?(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRF�siRiR(R"R<(RRFR@RG((R?sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?s	csx��D]}q
WdS(N((R>RO(R?(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRFsiRiR(R"R<(RRFR@RG((R?sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_stop_iterations	(RRR7RARBRCRDRERHRIRJRKRMRTRVRX(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR=ds																	tProfileSimulatorTestCasecBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs
t|�S(N(R((R((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR7scCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdS(N((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRAs	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsdddS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?'siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyttest_basic_exception&s	cCsAd�}t|�}|j|dd|fdd|fg�dS(NcSsyddWnnXdS(Ng�?i((R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?/siRR(R"R<(RR?R@((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR?8scs��dS(N(((R?(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRF:scs��dS(N(((RF(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRN<scs��dS(N(((RN(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRO>scs��dS(N((R>(RO(sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRP@siRiiiiR(R"R<(RRPR@RGRQRRRS((R?RFRNROsq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRT7s(	(RRR7RARZRCRT(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyRYs
					cCs4t|d�r|j}n	|j}|j|jfS(Ntf_code(thasattrR[t	func_codetco_firstlinenotco_name(tfunctiontcode((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR"Ts	cCsy||�WnnXdS(N((R?R>((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/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((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyR6cs

cCs#ddl}|jt|��dS(Ni����(R8R6(R:R8((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pytshow_eventstscCstjttt�dS(N(Rtrun_unittestRR=RY(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyt	test_mainyst__main__((RcR8RtunittestttestRtTestCaseRRR(R5R=RYR"Rbt
protect_identRR6RhRjR(((sq/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_sys_setprofile.pyt<module>s$ #�: