Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.222.133.15
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : hooks.pyo
�
A��cc@s�ddlZddlZddlZdejfd��YZdejfd��YZd�Zd�Ze	dkr~e�ndS(	i����NtCollationTestscBsbeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
cCsdS(N((tself((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytsetUpscCsdS(N((R((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyttearDownscCs<tjd�}|jt��|jdd��WdQXdS(Ns:memory:cSs||k||kS(N((txty((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyt<lambda>%t(tsqlitetconnecttassertRaisest	TypeErrortcreate_collationtNone(Rtcon((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckCreateCollationNotString"scCsatjd�}y!|jdd�|jd�Wn*tk
r\}|j|jdd�nXdS(Ns:memory:tXi*sshould have raised a TypeErrorisparameter must be callable(RR	RtfailRtassertEqualtargs(RRte((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckCreateCollationNotCallable'scCsMtjd�}y!|jdt�|jd�Wntjk
rH}nXdS(Ns:memory:scoll�s%should have raised a ProgrammingError(RR	RtcmpRtProgrammingError(RRR((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckCreateCollationNotAscii/scCs�dtfd��Y}tjd�}d�}|j|d�|�|jd�j�}|j|ddd�|j|d	dd
�dS(NtBadUpperStrcBseZd�ZRS(cSsdS(N(R
(R((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytupper9s(t__name__t
__module__R(((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyR8ss:memory:cSs||k||kS(N((RR((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyR<Rtmycolls�
            select x from (
            select 'a' as x
            union
            select 'b' as x
            ) order by x collate mycoll
            itbita(tstrRR	RtexecutetfetchallR(RRRRtresult((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckCreateCollationBadUpper7s	cCstjdkrdSd�}tjd�}|jd|�d}|j|�j�}|ddd	ks�|ddd
ks�|dddkr�|jd�n|jdd�y&|j|�j�}|jd
�Wn3tjk
r
}|j	|j
dj�d�nXdS(NiiicSst||�S(N(R(RR((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyRKss:memory:Rs�
            select x from (
            select 'a' as x
            union
            select 'b' as x
            union
            select 'c' as x
            ) order by x collate mycoll
            itcRRs#the expected order was not returneds&should have raised an OperationalErrors"no such collation sequence: mycoll(iii(Rtversion_infoR	RR!R"RR
tOperationalErrorRRtlower(RRRtsqlR#R((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckCollationIsUsedHs		<cCsfd�}tjd�}|jd|�d}|j|�j�}|j|d
ddgdd	�dS(
NcSs||k||kdS(Nii I((RR((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyRfss:memory:Rs�
            select x from (
            select 'a' as x
            union
            select 'b' as x
            union
            select 'c' as x
            ) order by x collate mycoll
            R%RRtmsgs#the expected order was not returned(R%(R(R(RR	RR!R"R(RRRR)R#((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyt!CheckCollationReturnsLargeIntegeres		cCs�tjd�}|jdt�|jdd��|jd�j�}|dddkso|dddkr|jd	�nd
S(s�
        Register two different collation functions under the same name.
        Verify that the last one is actually used.
        s:memory:RcSst||�S(N(R(RR((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyRRsi
            select x from (select 'a' as x union select 'b' as x) order by x collate mycoll
            iRiRs wrong collation function is usedN(RR	RRR!R"R(RRR#((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckCollationRegisterTwicexs(cCs�tjd�}|jdt�|jdd�y|jd�|jd�Wn<tjk
r�}|jdj	d�s�|jd�q�nXdS(	su
        Register a collation, then deregister it. Make sure an error is raised if we try
        to use it.
        s:memory:Rs?select 'a' as x union select 'b' as x order by x collate mycolls&should have raised an OperationalErrorisno such collation sequenceswrong OperationalError raisedN(
RR	RRR
R!RR'Rt
startswith(RRR((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckDeregisterCollation�s
(RRRRRRRR$R*R,R-R/(((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyRs									t
ProgressTestscBs,eZd�Zd�Zd�Zd�ZRS(csRtjd�}g��fd�}|j|d�|jd�|j��dS(sK
        Test that the progress handler is invoked once it is set.
        s:memory:cs�jd�dS(Ni(tappendR
((tprogress_calls(s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytprogress�s
is0
            create table foo(a, b)
            N(RR	tset_progress_handlerR!t
assertTrue(RRR3((R2s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckProgressHandlerUsed�scs�tjd�}g��fd�}|j|d�|j�}|jd�t��}g�|j|d�|jd�t��}|j||�dS(s=
        Test that the opcode argument is respected.
        s:memory:cs�jd�dS(Ni(R1R
((R2(s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyR3�s
is1
            create table foo (a, b)
            is1
            create table bar (a, b)
            N(RR	R4tcursorR!tlentassertGreaterEqual(RRR3tcurstfirst_counttsecond_count((R2s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckOpcodeCount�scs]tjd�}g��fd�}|j|d�|j�}|jtj|jd�dS(sW
        Test that returning a non-zero value stops the operation in progress.
        s:memory:cs�jd�dS(Ni(R1R
((R2(s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyR3�s
iscreate table bar (a, b)N(RR	R4R7R
R'R!(RRR3R:((R2s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckCancelOperation�scsttjd�}g��fd�}|j|d�|jdd�|jd�j�|jt��dd�dS(sc
        Test that setting the progress handler to None clears the previously set handler.
        s:memory:cs�jd�dS(Nii(R1((taction(s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyR3�s
is&select 1 union select 2 union select 3is progress handler was not clearedN(RR	R4R
R!R"RR8(RRR3((R?s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytCheckClearHandler�s(RRR6R=R>R@(((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyR0�s			cCs7tjtd�}tjtd�}tj||f�S(NtCheck(tunittestt	makeSuiteRR0t	TestSuite(tcollation_suitetprogress_suite((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pytsuite�scCs tj�}|jt��dS(N(RBtTextTestRunnertrunRG(trunner((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyttest�st__main__(
tosRBtsqlite3RtTestCaseRR0RGRKR(((s9/usr/local/python-2.7/lib/python2.7/sqlite3/test/hooks.pyt<module>szF		
© 2025 GrazzMean