%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/types.pyo

�
5}�ac@s2ddlZddlZddlZddlmZyddlZWnek
r]dZnXdej	fd��YZ
dej	fd��YZdej	fd��YZd	ej	fd
��YZ
ejed�dej	fd
��Y�Zdej	fd��YZd�Zd�Zedkr.e�ndS(i����N(ttest_supporttSqliteTypeTestscBskeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(cCs8tjd�|_|jj�|_|jjd�dS(Ns:memory:s9create table test(i integer, s varchar, f number, b blob)(tsqlitetconnecttcontcursortcurtexecute(tself((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytsetUp#scCs|jj�|jj�dS(N(RtcloseR(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyttearDown(s
cCsJ|jjdd�|jjd�|jj�}|j|dd�dS(Nsinsert into test(s) values (?)uÖsterreichsselect s from testi(uÖsterreich(RRtfetchonetassertEqual(Rtrow((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckString,scCsJ|jjdd�|jjd�|jj�}|j|dd�dS(Nsinsert into test(i) values (?)i*sselect i from testi(i*(RRRR
(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt
CheckSmallInt2scCsSd}|jjd|f�|jjd�|jj�}|j|d|�dS(Nii(sinsert into test(i) values (?)sselect i from testiI(RRRR
(RtnumR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt
CheckLargeInt8s
cCsSd}|jjd|f�|jjd�|jj�}|j|d|�dS(Ng��Q�	@sinsert into test(f) values (?)sselect f from testi(RRRR
(RtvalR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt
CheckFloat?s
cCsltj��td�}WdQX|jjd|f�|jjd�|jj�}|j|d|�dS(NtGuglhupfsinsert into test(b) values (?)sselect b from testi(Rtcheck_py3k_warningstbufferRRRR
(RRR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt	CheckBlobFs
cCs7|jjd�|jj�}|j|dd�dS(Nuselect 'Österreich'iuÖsterreich(RRRR
(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckUnicodeExecuteNscCsHy-|jjdtd�f�|jd�Wntjk
rCnXdS(Nsselect ?i�s%should have raised a ProgrammingError(RRtchrtfailRtProgrammingError(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckNonUtf8_DefaultSs
cCsL|jj}z,t|j_|jjdtd�f�Wd||j_XdS(Nsselect ?i�(Rttext_factorytstrRRR(Rtorig_text_factory((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckNonUtf8_TextFactoryStringZs
 cCsw|jj}zWy<tj|j_|jjdtd�f�|jd�Wntjk
ranXWd||j_XdS(Nsselect ?i�s%should have raised a ProgrammingError(	RRRtOptimizedUnicodeRRRRR(RR ((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt(CheckNonUtf8_TextFactoryOptimizedUnicodebs(
t__name__t
__module__R	RRRRRRRRR!R#(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR"s										tDeclTypesTestscBs�eZddd��YZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�ZRS(tFoocBs,eZd�Zd�Zd�Zd�ZRS(cCs
||_dS(N(R(Rt_val((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt__init__pscCs9t|tj�st�n|j|jkr1dSdSdS(Nii(t
isinstanceR&R't
ValueErrorR(Rtother((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt__cmp__ss
	cCs|tjkr|jSdSdS(N(RtPrepareProtocolRtNone(Rtprotocol((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt__conform__{scCsd|jS(Ns<%s>(R(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt__str__�s(R$R%R)R-R1R2(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR'os			cCs�tjddtj�|_|jj�|_|jjd�d�tjd<d�tjd<tj	tjd<d	�tjd
<t
tjd<dS(Ns:memory:tdetect_typessgcreate table test(i int, s str, f float, b bool, u unicode, foo foo, bin blob, n1 number, n2 number(5))cSsdS(Ng������G@((tx((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt<lambda>�ttFLOATcSstt|��S(N(tbooltint(R4((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR5�R6tBOOLtFOOcSsdS(NtWRONG((R4((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR5�R6R<tNUMBER(RRtPARSE_DECLTYPESRRRRt
convertersR&R'tfloat(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR	�scCsFtjd=tjd=tjd=tjd=|jj�|jj�dS(NR7R:R;R=(RR?RR
R(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR�s




cCsJ|jjdd�|jjd�|jj�}|j|dd�dS(Nsinsert into test(s) values (?)tfoos!select s as "s [WRONG]" from testi(RA(RRRR
(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR�scCsJ|jjdd�|jjd�|jj�}|j|dd�dS(Nsinsert into test(i) values (?)i*sselect i from testi(i*(RRRR
(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR�scCsSd}|jjd|f�|jjd�|jj�}|j|d|�dS(Nii(sinsert into test(i) values (?)sselect i from testiI(RRRR
(RRR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR�s
cCsSd}|jjd|f�|jjd�|jj�}|j|dd�dS(Ng��Q�	@sinsert into test(f) values (?)sselect f from testig������G@(RRRR
(RRR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR�s
cCs�|jjdtf�|jjd�|jj�}|j|dt�|jjd�|jjdtf�|jjd�|jj�}|j|dt�dS(Nsinsert into test(b) values (?)sselect b from testisdelete from test(RRtFalseRR
tTrue(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt	CheckBool�scCsSd}|jjd|f�|jjd�|jj�}|j|d|�dS(NuÖsterreichsinsert into test(u) values (?)sselect u from testi(RRRR
(RRR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckUnicode�s
cCs\tjd�}|jjd|f�|jjd�|jj�}|j|d|�dS(Ntblas insert into test(foo) values (?)sselect foo from testi(R&R'RRRR
(RRR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckFoo�s
cCsqddd��Y}|�}y'|jjd|f�|jd�Wn'tjk
rYn|jd�nXdS(NtBarcBseZRS((R$R%(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRH�ssinsert into test(f) values (?)s$should have raised an InterfaceError((RRRRtInterfaceError(RRHR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckUnsupportedSeq�s	cCsuddd��Y}|�}y+|jjdi|d6�|jd�Wn'tjk
r]n|jd�nXdS(NRHcBseZRS((R$R%(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRH�ss!insert into test(f) values (:val)Rs$should have raised an InterfaceError((RRRRRI(RRHR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckUnsupportedDict�s	cCsltj��td�}WdQX|jjd|f�|jjd�|jj�}|j|d|�dS(NRs insert into test(bin) values (?)sselect bin from testi(RRRRRRR
(RRR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR�s
cCsF|jjd�|jjd�j�d}|jt|�t�dS(Nsinsert into test(n1) values (5)sselect n1 from testi(RRRR
ttypeR@(Rtvalue((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckNumber1�scCsF|jjd�|jjd�j�d}|jt|�t�dS(s<Checks whether converter names are cut off at '(' characterssinsert into test(n2) values (5)sselect n2 from testiN(RRRR
RLR@(RRM((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckNumber2�s((R$R%R'R	RRRRRRDRERGRJRKRRNRO(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR&ns							
							t
ColNamesTestscBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs�tjddtj�|_|jj�|_|jjd�d�tjd<d�tjd<d�tjd	<d
�tjd<dS(Ns:memory:R3screate table test(x foo)cSsd|S(Ns[%s]((R4((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR5R6R;cSsd|S(Ns<%s>((R4((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR5R6tBARcSsddS(Nii((R4((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR5R6tEXCcSsdS(NtMARKER((R4((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR5	R6tB1B1(RRtPARSE_COLNAMESRRRRR?(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR	scCsFtjd=tjd=tjd=tjd=|jj�|jj�dS(NR;RQRRRT(RR?RR
R(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRs




cCsJ|jjdd�|jjd�|jj�d}|j|d�dS(se
        Assures that the declared type is not used when PARSE_DECLTYPES
        is not set.
        sinsert into test(x) values (?)txxxsselect x from testiN(RV(RRRR
(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckDeclTypeNotUsedscCsJ|jjdd�|jjd�|jj�d}|j|d�dS(Nsinsert into test(x) values (?)sselect x from testi(N(RRR/RR
(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt	CheckNonescCsh|jjdd�|jjd�|jj�d}|j|d�|j|jjddd�dS(Nsinsert into test(x) values (?)RVsselect x as "x [bar]" from testis<xxx>R4(RV(RRRR
tdescription(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckColName#s
cCs7|jjd�|jj�d}|j|d�dS(Nsselect 'other' as "x [b1b1]"iRS(RRRR
(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckCaseInConverterName-scCs2|jjd�|j|jjddd�dS(sq
        cursor.description should at least provide the column name(s), even if
        no row returned.
        sselect * from test where 0 = 1iR4N(RRR
RY(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckCursorDescriptionNoRow2s(	R$R%R	RRWRXRZR[R\(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRPs	
		
		
	tObjectAdaptationTestscBs8eZd�Zee�Zd�Zd�Zd�ZRS(cCs
t|�S(N(R@(tobj((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytcast;scCsStjd�|_ytjt=WnnXtjttj�|jj�|_	dS(Ns:memory:(
RRRtadaptersR9tregister_adapterR]R_RR(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR	?scCs1tjttjf=|jj�|jj�dS(N(RR`R9R.RR
R(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRHs
cCs@|jjdd�|jj�d}|jt|�t�dS(Nsselect ?ii(i(RRRR
RLR@(RR((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckCasterIsUsedMs(R$R%R_tstaticmethodR	RRb(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR]:s
				s
requires zlibtBinaryConverterTestscBs8eZd�Zee�Zd�Zd�Zd�ZRS(cCs
tj|�S(N(tzlibt
decompress(ts((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytconvertTscCs2tjddtj�|_tjdtj�dS(Ns:memory:R3tbin(RRRURtregister_converterRdRh(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR	XscCs|jj�dS(N(RR
(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR\sc	Csbdd}tj��6|jjdttj|��f�j�d}WdQX|j||�dS(Ntabcdefgi
sselect ? as "x [bin]"i(	RRRRRRetcompressRR
(Rttestdatatresult((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckBinaryInputForConverter_s

7(R$R%RhRcR	RRo(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRdRs
			t
DateTimeTestscBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsAtjddtj�|_|jj�|_|jjd�dS(Ns:memory:R3s'create table test(d date, ts timestamp)(RRR>RRRR(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyR	fscCs|jj�|jj�dS(N(RR
R(R((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRks
cCsbtjddd�}|jjd|f�|jjd�|jj�d}|j||�dS(Ni�iisinsert into test(d) values (?)sselect d from testi(RtDateRRRR
(Rtdtd2((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckSqliteDateos
cCsktjdddddd�}|jjd|f�|jjd�|jj�d}|j||�dS(	Ni�iiiiisinsert into test(ts) values (?)sselect ts from test(Rt	TimestampRRRR
(Rttstts2((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckSqliteTimestampvs
cCs�tjdkrdStjj�}|jjd�|jjd�|jj�d}|jt|�tj�|j|j	|j	�dS(Niis/insert into test(ts) values (current_timestamp)sselect ts from testi(ii(
Rtsqlite_version_infotdatetimetutcnowRRRR
RLtyear(RtnowRv((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckSqlTimestamp}scCsntjddddddd�}|jjd|f�|jjd	�|jj�d}|j||�dS(
Ni�iiiiii �sinsert into test(ts) values (?)sselect ts from test(RRuRRRR
(RRvRw((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytCheckDateTimeSubSeconds�s
!cCsntjddddddd�}|jjd|f�|jjd	�|jj�d}|j||�dS(
Ni�iiiiii!�sinsert into test(ts) values (?)sselect ts from test(RRuRRRR
(RRvRw((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt$CheckDateTimeSubSecondsFloatingPoint�s
!(	R$R%R	RRtRxR~RR�(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyRpes						cCs�tjtd�}tjtd�}tjtd�}tjtd�}tjtd�}tjtd�}tj||||||f�S(NtCheck(	tunittestt	makeSuiteRR&RPR]RdRpt	TestSuite(tsqlite_type_suitetdecltypes_type_suitetcolnames_type_suitetadaptation_suitet	bin_suitet
date_suite((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pytsuite�scCs tj�}|jt��dS(N(R�tTextTestRunnertrunR�(trunner((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyttest�st__main__(RzR�tsqlite3RR�RRetImportErrorR/tTestCaseRR&RPR]t
skipUnlessRdRpR�R$(((s;/opt/plesk/python/2.7/lib64/python2.7/sqlite3/test/types.pyt<module>s$

L�:2			

Zerion Mini Shell 1.0