%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyc

�
5}�ac@s�ddlZddlZddlmZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zdd.d��YZdd/d��YZdd0d��YZdd1d��YZdd2d��YZdd3d��YZdd4d��YZdejfd ��YZd!ejfd"��YZd#ejfd$��YZd%efd&��YZd'efd(��YZd)efd*��YZ d+�Z!d,�Ze"d-kr�e�ndS(5i����N(ttest_supportcCsdS(Ntfoo((((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_returntextscCsdS(Nubar((((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_returnunicodescCsdS(Ni*((((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_returnint!scCsdS(Ng��Q�	@((((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_returnfloat#scCsdS(N(tNone(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_returnnull%scCs!tj��td�SWdQXdS(Ntblob(Rtcheck_py3k_warningstbuffer(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_returnblob's
cCsdS(NiiI�((((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_returnlonglong*scCsdddS(Nii((((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_raiseexception,scCst|�tkS(N(ttypetunicode(tv((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyt
func_isstring/scCst|�tkS(N(Rtint(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyt
func_isint1scCst|�tkS(N(Rtfloat(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_isfloat3scCst|�td�kS(N(RR(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_isnone5scCst|�tkS(N(RR
(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_isblob7scCst|ttf�o|dkS(NiiI�(t
isinstanceRtlong(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfunc_islonglong9st
AggrNoStepcBseZd�Zd�ZRS(cCsdS(N((tself((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyt__init__=scCsdS(Ni((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytfinalize@s(t__name__t
__module__RR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR<s	tAggrNoFinalizecBseZd�Zd�ZRS(cCsdS(N((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRDscCsdS(N((Rtx((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytstepGs(RR RR#(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR!Cs	tAggrExceptionInInitcBs#eZd�Zd�Zd�ZRS(cCsdddS(Nii((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRKscCsdS(N((RR"((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR#NscCsdS(N((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRQs(RR RR#R(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR$Js		tAggrExceptionInStepcBs#eZd�Zd�Zd�ZRS(cCsdS(N((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRUscCsdddS(Nii((RR"((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR#XscCsdS(Ni*((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR[s(RR RR#R(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR%Ts		tAggrExceptionInFinalizecBs#eZd�Zd�Zd�ZRS(cCsdS(N((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR_scCsdS(N((RR"((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR#bscCsdddS(Nii((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRes(RR RR#R(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR&^s		t
AggrCheckTypecBs#eZd�Zd�Zd�ZRS(cCs
d|_dS(N(Rtval(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRiscCsRitd6td6td6td�d6td6}t||t|�k�|_dS(NtstrRRRR(RRRRRR
R((Rt	whichTypeR(ttheType((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR#ls/cCs|jS(N(R((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRps(RR RR#R(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR'hs		tAggrSumcBs#eZd�Zd�Zd�ZRS(cCs
d|_dS(Ng(R((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRtscCs|j|7_dS(N(R((RR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR#wscCs|jS(N(R((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRzs(RR RR#R(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR,ss		t
FunctionTestscBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�ZRS(cCsJtjd�|_|jjddt�|jjddt�|jjddt�|jjddt�|jjddt�|jjddt	�|jjd	dt
�|jjd
dt�|jjddt�|jjd
dt
�|jjddt�|jjddt�|jjddt�|jjddt�dS(Ns:memory:t
returntextit
returnunicodet	returninttreturnfloatt
returnnullt
returnblobtreturnlonglongtraiseexceptiontisstringitisinttisfloattisnonetisblobt
islonglong(tsqlitetconnecttcontcreate_functionRRRRRRRR
RRRRRR(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytsetUp~scCs|jj�dS(N(R>tclose(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyttearDown�scCsEy*|jjddd��|jd�Wntjk
r@nXdS(Ntblai����cSsd|S(Ni((R"((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyt<lambda>�ts&should have raised an OperationalError(R>R?tfailR<tOperationalError(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncErrorOnCreate�s
cCsUd�}|�}|t�d<|jjdd|�|jj�}|jd�dS(NcSs
d�}|S(NcSsdS(Ni((((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytf�s((RI((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytgetfunc�s	Rtreftestisselect reftest()(tglobalsR>R?tcursortexecute(RRJRItcur((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncRefCount�s		
cCsV|jj�}|jd�|j�d}|jt|�t�|j|d�dS(Nsselect returntext()iR(R>RMRNtfetchonetassertEqualRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncReturnText�s

cCsV|jj�}|jd�|j�d}|jt|�t�|j|d�dS(Nsselect returnunicode()iubar(R>RMRNRQRRRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncReturnUnicode�s

cCsV|jj�}|jd�|j�d}|jt|�t�|j|d�dS(Nsselect returnint()ii*(R>RMRNRQRRRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncReturnInt�s

cCsn|jj�}|jd�|j�d}|jt|�t�|dksZ|dkrj|jd�ndS(Nsselect returnfloat()ig�&1�	@gT㥛� 	@swrong value(R>RMRNRQRRRRRF(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncReturnFloat�s
cCs\|jj�}|jd�|j�d}|jt|�td��|j|d�dS(Nsselect returnnull()i(R>RMRNRQRRRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncReturnNull�s

cCso|jj�}|jd�|j�d}tj��1|jt|�t�|j|td��WdQXdS(Nsselect returnblob()iR(	R>RMRNRQRR	RRRR
(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncReturnBlob�s

cCs@|jj�}|jd�|j�d}|j|d�dS(Nsselect returnlonglong()iiiI�(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncReturnLongLong�s
cCsk|jj�}y(|jd�|j�|jd�Wn-tjk
rf}|j|jdd�nXdS(Nsselect raiseexception()s#should have raised OperationalErroris&user-defined function raised exception(	R>RMRNRQRFR<RGRRtargs(RROte((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckFuncException�s

cCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect isstring(?)Rii(R(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckParamString�scCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect isint(?)i*ii(i*(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyt
CheckParamInt�scCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect isfloat(?)g��Q�	@ii(g��Q�	@(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckParamFloat�scCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect isnone(?)ii(N(R>RMRNRRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckParamNone�scCs_|jj�}tj��|jdtd�f�WdQX|j�d}|j|d�dS(Nsselect isblob(?)Rii(R>RMRR	RNR
RQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckParamBlob�s

cCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect islonglong(?)ii*iI(I(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckParamLongLongs(RR R@RBRHRPRSRTRURVRWRXRYR\R]R^R_R`RaRb(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR-}s$																		tAggregateTestscBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(cCstjd�|_|jj�}|jd�tj��*|jdddddtd�f�WdQX|jj	dd	t
�|jj	d
d	t�|jj	dd	t�|jj	dd	t
�|jj	d
d	t�|jj	ddt�|jj	dd	t�dS(Ns:memory:s�
            create table test(
                t text,
                i integer,
                f float,
                n,
                b blob
                )
            s6insert into test(t, i, f, n, b) values (?, ?, ?, ?, ?)Rig��Q�	@Rtnostepit
nofinalizetexcInittexcSteptexcFinalizet	checkTypeitmysum(R<R=R>RMRNRR	RR
tcreate_aggregateRR!R$R%R&R'R,(RRO((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR@s
	"cCsdS(N((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRB scCsBy'|jjddt�|jd�Wntjk
r=nXdS(NRCi����s&should have raised an OperationalError(R>R?R,RFR<RG(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrErrorOnCreate%s
cCs^|jj�}y|jd�|jd�Wn*tk
rY}|j|jdd�nXdS(Nsselect nostep(t) from tests$should have raised an AttributeErroris+AggrNoStep instance has no attribute 'step'(R>RMRNRFtAttributeErrorRRRZ(RROR[((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrNoStep,s
cCsq|jj�}y.|jd�|j�d}|jd�Wn-tjk
rl}|j|jdd�nXdS(Nsselect nofinalize(t) from testis&should have raised an OperationalErrors7user-defined aggregate's 'finalize' method raised error(	R>RMRNRQRFR<RGRRRZ(RROR(R[((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrNoFinalize4s
cCsq|jj�}y.|jd�|j�d}|jd�Wn-tjk
rl}|j|jdd�nXdS(Nsselect excInit(t) from testis&should have raised an OperationalErrors7user-defined aggregate's '__init__' method raised error(	R>RMRNRQRFR<RGRRRZ(RROR(R[((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrExceptionInInit=s
cCsq|jj�}y.|jd�|j�d}|jd�Wn-tjk
rl}|j|jdd�nXdS(Nsselect excStep(t) from testis&should have raised an OperationalErrors3user-defined aggregate's 'step' method raised error(	R>RMRNRQRFR<RGRRRZ(RROR(R[((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrExceptionInStepFs
cCsq|jj�}y.|jd�|j�d}|jd�Wn-tjk
rl}|j|jdd�nXdS(Nsselect excFinalize(t) from testis&should have raised an OperationalErrors7user-defined aggregate's 'finalize' method raised error(	R>RMRNRQRFR<RGRRRZ(RROR(R[((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrExceptionInFinalizeOs
cCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect checkType('str', ?)Rii(R(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrCheckParamStrXscCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect checkType('int', ?)i*ii(i*(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrCheckParamInt^scCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect checkType('float', ?)g��Q�	@ii(g��Q�	@(R>RMRNRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrCheckParamFloatdscCsC|jj�}|jdd�|j�d}|j|d�dS(Nsselect checkType('None', ?)ii(N(R>RMRNRRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrCheckParamNonejscCs_|jj�}tj��|jdtd�f�WdQX|j�d}|j|d�dS(Nsselect checkType('blob', ?)Rii(R>RMRR	RNR
RQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrCheckParamBlobps

cCsf|jj�}|jd�|jdd	d
dg�|jd�|j�d}|j|d�dS(Nsdelete from testsinsert into test(i) values (?)i
iisselect mysum(i) from testii<(i
(i(i(R>RMRNtexecutemanyRQRR(RROR(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytCheckAggrCheckAggrSumws

(RR R@RBRlRnRoRpRqRrRsRtRuRvRwRy(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRcs																	tAuthorizerTestscBs;eZed��Zd�Zd�Zd�Zd�ZRS(cCs<|tjkrtjS|dks.|dkr5tjStjS(Ntc2tt2(R<t
SQLITE_SELECTtSQLITE_DENYt	SQLITE_OK(tactiontarg1targ2tdbnametsource((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyt
authorizer_cb�s
cCsItjd�|_|jjd�|jjd�|jj|j�dS(Ns:memory:s�
            create table t1 (c1, c2);
            create table t2 (c1, c2);
            insert into t1 (c1, c2) values (1, 2);
            insert into t2 (c1, c2) values (4, 5);
            sselect c2 from t2(R<R=R>t
executescriptRNtset_authorizerR�(R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR@�s
	cCsdS(N((R((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRB�scCspy|jjd�WnHtjk
r^}|jdjd�sZ|jd|jd�ndSX|jd�dS(Nsselect * from t2it
prohibitedswrong exception text: %ss9should have raised an exception due to missing privileges(R>RNR<t
DatabaseErrorRZtendswithRF(RR[((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyttest_table_access�scCspy|jjd�WnHtjk
r^}|jdjd�sZ|jd|jd�ndSX|jd�dS(Nsselect c2 from t1iR�swrong exception text: %ss9should have raised an exception due to missing privileges(R>RNR<R�RZR�RF(RR[((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyttest_column_access�s(RR tstaticmethodR�R@RBR�R�(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyRzs
				tAuthorizerRaiseExceptionTestscBseZed��ZRS(cCs@|tjkrt�n|dks0|dkr9t�ntjS(NR{R|(R<R}t
ValueErrorR(R�R�R�R�R�((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR��s
		(RR R�R�(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR��stAuthorizerIllegalTypeTestscBseZed��ZRS(cCs6|tjkrdS|dks+|dkr/dStjS(NgR{R|(R<R}R(R�R�R�R�R�((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR��s
(RR R�R�(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR��stAuthorizerLargeIntegerTestscBseZed��ZRS(cCs6|tjkrdS|dks+|dkr/dStjS(Nii R{R|II(R<R}R(R�R�R�R�R�((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR��s
(RR R�R�(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyR��scCsmtjtd�}tjtd�}tjt�}tj|||tjt�tjt�tjt�f�S(NtCheck(	tunittestt	makeSuiteR-RcRzt	TestSuiteR�R�R�(tfunction_suitetaggregate_suitetauthorizer_suite((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pytsuite�scCs tj�}|jt��dS(N(R�tTextTestRunnertrunR�(trunner((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyttest�st__main__((((((((#R�tsqlite3R<R�RRRRRRRRR
RRRRRRRR!R$R%R&R'R,tTestCaseR-RcRzR�R�R�R�R(((sC/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/userfunctions.pyt<module>sB														



�x,		
	
	

Zerion Mini Shell 1.0