+
    Biw                        ^ RI t ^ RIt^ RIt^ RIHtHt ^ RIHtH	t	 ^RI
HtHt ^RI
Ht R tR tR tR	 tR
 tR tR tR tR tR tR t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R 4      t  ! R! R"4      t! ! R# R$]PD                  4      t# ! R% R&4      t$ ! R' R(]%4      t&]PN                  ! ]PP                  R78  R)4       ! R* R+]PD                  4      4       t) ! R, R-]PD                  4      t* ! R. R/]PD                  4      t+ ! R0 R1]+4      t, ! R2 R3]+4      t- ! R4 R5]+4      t.]/R68X  d   ]P`                  ! 4        R# R# )8    N)Mockpatch)
bigmemtest
gc_collect)cx_limitmemory_database)with_tracebacksc                      R # )foo r       ;/usr/lib/python3.14/test/test_sqlite3/test_userfunctions.pyfunc_returntextr   #       r   c                      R # )1 2r   r   r   r   func_returntextwithnullr   %   s    r   c                      R # )barr   r   r   r   func_returnunicoder   '   r   r   c                      ^*# *   r   r   r   r   func_returnintr   )   s    r   c                      R # Q	@r   r   r   r   func_returnfloatr   +       r   c                      R # Nr   r   r   r   func_returnnullr"   -   r   r   c                      R # )   blobr   r   r   r   func_returnblobr%   /   s    r   c                      R# )           r   r   r   r   func_returnlonglongr)   1   s    Lr   c                      ^^ ,           R#    Nr   r   r   r   func_raiseexceptionr-   3   s    aCCr   c                      \         hr!   )MemoryErrorr   r   r   func_memoryerrorr0   5   s    
r   c                      \         hr!   )OverflowErrorr   r   r   func_overflowerrorr3   7   s    
r   c                   ,   a  ] tR t^:t o R tR tRtV tR# )
AggrNoStepc                    R # r!   r   selfs   &r   __init__AggrNoStep.__init__;       r   c                    ^# r'   r   r7   s   &r   finalizeAggrNoStep.finalize>   s    r   r   N)__name__
__module____qualname____firstlineno__r9   r>   __static_attributes____classdictcell____classdict__s   @r   r5   r5   :   s      r   r5   c                   ,   a  ] tR t^At o R tR tRtV tR# )AggrNoFinalizec                    R # r!   r   r7   s   &r   r9   AggrNoFinalize.__init__B   r;   r   c                    R # r!   r   r8   xs   &&r   stepAggrNoFinalize.stepE   r;   r   r   N)r@   rA   rB   rC   r9   rO   rD   rE   rF   s   @r   rI   rI   A   s      r   rI   c                   2   a  ] tR t^Ht o R tR tR tRtV tR# )AggrExceptionInInitc                    ^^ ,           R# r+   r   r7   s   &r   r9   AggrExceptionInInit.__init__I       	!r   c                    R # r!   r   rM   s   &&r   rO   AggrExceptionInInit.stepL   r;   r   c                    R # r!   r   r7   s   &r   r>   AggrExceptionInInit.finalizeO   r;   r   r   N	r@   rA   rB   rC   r9   rO   r>   rD   rE   rF   s   @r   rR   rR   H   s      r   rR   c                   2   a  ] tR t^Rt o R tR tR tRtV tR# )AggrExceptionInStepc                    R # r!   r   r7   s   &r   r9   AggrExceptionInStep.__init__S   r;   r   c                    ^^ ,           R# r+   r   rM   s   &&r   rO   AggrExceptionInStep.stepV   rU   r   c                    ^*# r   r   r7   s   &r   r>   AggrExceptionInStep.finalizeY   s    r   r   NrZ   rF   s   @r   r\   r\   R   s      r   r\   c                   2   a  ] tR t^\t o R tR tR tRtV tR# )AggrExceptionInFinalizec                    R # r!   r   r7   s   &r   r9    AggrExceptionInFinalize.__init__]   r;   r   c                    R # r!   r   rM   s   &&r   rO   AggrExceptionInFinalize.step`   r;   r   c                    ^^ ,           R# r+   r   r7   s   &r   r>    AggrExceptionInFinalize.finalizec   rU   r   r   NrZ   rF   s   @r   rd   rd   \   s      r   rd   c                   2   a  ] tR t^ft o R tR tR tRtV tR# )AggrCheckTypec                    R V n         R # r!   valr7   s   &r   r9   AggrCheckType.__init__g   s	    r   c           
         R \         R\        R\        R\        R4      R\        /p\        W1,          \        V4      J 4      V n        R# strintfloatNoneNblobrs   rt   ru   typebytesro   )r8   	whichTypero   theTypes   &&& r   rO   AggrCheckType.stepj   s;    #uc7E64:5"w)T#Y67r   c                    V P                   # r!   rn   r7   s   &r   r>   AggrCheckType.finalizeo       xxr   rn   NrZ   rF   s   @r   rl   rl   f   s     8
 r   rl   c                   2   a  ] tR t^rt o R tR tR tRtV tR# )AggrCheckTypesc                    ^ V n         R# r   Nrn   r7   s   &r   r9   AggrCheckTypes.__init__s   s	    r   c           
         R \         R\        R\        R\        R4      R\        /pV F6  pV ;P
                  \        W1,          \        V4      J 4      ,          un        K8  	  R# rr   rx   )r8   r{   valsr|   ro   s   &&*  r   rO   AggrCheckTypes.stepv   sL    #uc7E64:5"CHHG.$s);<<H r   c                    V P                   # r!   rn   r7   s   &r   r>   AggrCheckTypes.finalize|   r   r   rn   NrZ   rF   s   @r   r   r   r   s     = r   r   c                   2   a  ] tR t^t o R tR tR tRtV tR# )AggrSumc                    R V n         R# )        Nrn   r7   s   &r   r9   AggrSum.__init__   s	    r   c                8    V ;P                   V,          un         R # r!   rn   )r8   ro   s   &&r   rO   AggrSum.step   s    Cr   c                    V P                   # r!   rn   r7   s   &r   r>   AggrSum.finalize   r   r   rn   NrZ   rF   s   @r   r   r      s      r   r   c                   2   a  ] tR t^t o R tR tR tRtV tR# )AggrTextc                    R V n         R# ) Ntxtr7   s   &r   r9   AggrText.__init__   s	    r   c                6    V P                   V,           V n         R # r!   r   )r8   r   s   &&r   rO   AggrText.step   s    88c>r   c                    V P                   # r!   r   r7   s   &r   r>   AggrText.finalize   r   r   r   NrZ   rF   s   @r   r   r      s     " r   r   c                   L  a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR t]! ]RR7      R 4       t]! ]RR7      R 4       t]! ]RR7      R 4       tR tR tR tR tR t]! ]RR7      R 4       tR t R t!R  t"R! t#R" t$R# t%]! ]4      R$ 4       t&]! ]'R%4      R& 4       t(])PT                  ! ]+PX                  R08  R'4      ]-! R1^R(R)7      R* 4       4       t.])PT                  ! ]+PX                  R08  R'4      ]-! R1^R(R)7      R+ 4       4       t/R, t0R- t1R.t2V t3R/# )2FunctionTestsc                t   \         P                  ! R 4      V n        V P                  P                  R^ \        4       V P                  P                  R^ \
        4       V P                  P                  R^ \        4       V P                  P                  R^ \        4       V P                  P                  R^ \        4       V P                  P                  R^ \        4       V P                  P                  R^ \        4       V P                  P                  R^ \        4       V P                  P                  R	^ R
 4       V P                  P                  R^ R 4       V P                  P                  R^ \        4       V P                  P                  R^ \        4       V P                  P                  R^ \        4       V P                  P                  R^R 4       V P                  P                  R^R 4       V P                  P                  RRR 4       V P                  P                  R4       R# ):memory:
returntextreturntextwithnullreturnunicode	returnintreturnfloat
returnnull
returnblobreturnlonglong	returnnanc                      \        R 4      # )nan)ru   r   r   r   <lambda>%FunctionTests.setUp.<locals>.<lambda>   s    ur   return_noncont_blobc                  &    \        R 4      R,          # )r$   NN   )
memoryviewr   r   r   r   r      s    G)<S)Ar   raiseexceptionmemoryerroroverflowerrorisblobc                 "    \        V \        4      # r!   )
isinstancerz   rN   s   &r   r   r      s    
1e8Lr   isnonec                 
    V R J # r!   r   r   s   &r   r   r      s    T	r   spamc                      \        V 4      # r!   )lenr   s   *r   r   r      s    Ar   zcreate table test(t text)N)sqliteconnectconcreate_functionr   r   r   r   r   r"   r%   r)   r-   r0   r3   executer7   s   &r   setUpFunctionTests.setUp   s   >>*-  q/B  !5q:QR  !5GH  a@  3CD  q/B  q/B  !116IJ  a1EF  !6!A	C  !116IJ  3CD  !5GH  1.LM  1.AB  ->?45r   c                :    V P                   P                  4        R # r!   r   closer7   s   &r   tearDownFunctionTests.tearDown       r   c                    V P                  \        P                  R 4      ;_uu_ 4        V P                  P	                  RRR 4       RRR4       R#   + '       g   i     R# ; i)not -100blac                     ^V ,          # )r   r   r   s   &r   r   9FunctionTests.test_func_error_on_create.<locals>.<lambda>   s    AaCr   N)assertRaisesRegexr   ProgrammingErrorr   r   r7   s   &r   test_func_error_on_create'FunctionTests.test_func_error_on_create   sA    ##F$;$;ZHHHH$$UD-@ IHHHs   AA#	c           	        \         P                  pR p\        V P                  V^R7      ;_uu_ 4        V P                  P	                  R4       V P                  \         P                  V4      ;_uu_ 4        V P                  P	                  R4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)ztoo many arguments on function)categorylimitzselect abs(-1)zselect max(1, 2)N)r   SQLITE_LIMIT_FUNCTION_ARGr   r   r   r   OperationalError)r8   r   msgs   &  r   test_func_too_many_args%FunctionTests.test_func_too_many_args   s    33.dhh;;HH-.''(?(?EE  !34 F <;EE <;;s$   AB87B%	B8%B50B88C		c                    R  pV! 4       pV\        4       R&   V P                  P                  R^ V4       V P                  P                  4       pVP	                  R4       R# )c                      R  p V # )c                      ^# r=   r   r   r   r   f=FunctionTests.test_func_ref_count.<locals>.getfunc.<locals>.f   s    r   r   )r   s    r   getfunc2FunctionTests.test_func_ref_count.<locals>.getfunc   s    Hr   r   reftestzselect reftest()N)globalsr   r   cursorr   )r8   r   r   curs   &   r   test_func_ref_count!FunctionTests.test_func_ref_count   sO    	 I	%  Aq1hhoo&'r   c                    V P                   P                  4       pVP                  R 4       VP                  4       ^ ,          pV P	                  \        V4      \        4       V P	                  VR4       R# )zselect returntext()r   Nr   r   r   fetchoneassertEqualry   rs   r8   r   ro   s   &  r   test_func_return_text#FunctionTests.test_func_return_text   sS    hhoo)*llnQcC(e$r   c                    V P                   P                  4       pVP                  R 4      P                  4       ^ ,          pV P	                  \        V4      \        4       V P	                  VR4       R# )zselect returntextwithnull()r   Nr   )r8   r   ress   &  r   $test_func_return_text_with_null_char2FunctionTests.test_func_return_text_with_null_char   sS    hhookk78AACAFcC(h'r   c                    V P                   P                  4       pVP                  R 4       VP                  4       ^ ,          pV P	                  \        V4      \        4       V P	                  VR4       R# )zselect returnunicode()r   Nr   r   s   &  r   test_func_return_unicode&FunctionTests.test_func_return_unicode   sS    hhoo,-llnQcC(e$r   c                    V P                   P                  4       pVP                  R 4       VP                  4       ^ ,          pV P	                  \        V4      \        4       V P	                  V^*4       R# )zselect returnint()N)r   r   r   r   r   ry   rt   r   s   &  r   test_func_return_int"FunctionTests.test_func_return_int   sS    hhoo()llnQcC(b!r   c                
   V P                   P                  4       pVP                  R 4       VP                  4       ^ ,          pV P	                  \        V4      \        4       VR8  g   VR8  d   V P                  R4       R# R# )zselect returnfloat()g&1	@gT㥛 	@zwrong valueN)r   r   r   r   r   ry   ru   failr   s   &  r   test_func_return_float$FunctionTests.test_func_return_float   sa    hhoo*+llnQcE*;#+IIm$ &r   c                    V P                   P                  4       pVP                  R 4       VP                  4       ^ ,          pV P	                  \        V4      \        R4      4       V P	                  VR4       R# )zselect returnnull()N)r   r   r   r   r   ry   r   s   &  r   test_func_return_null#FunctionTests.test_func_return_null   sW    hhoo)*llnQcDJ/d#r   c                    V P                   P                  4       pVP                  R 4       VP                  4       ^ ,          pV P	                  \        V4      \        4       V P	                  VR4       R# )zselect returnblob()r$   N)r   r   r   r   r   ry   rz   r   s   &  r   test_func_return_blob#FunctionTests.test_func_return_blob   sS    hhoo)*llnQcE*g&r   c                    V P                   P                  4       pVP                  R 4       VP                  4       ^ ,          pV P	                  VR4       R# )zselect returnlonglong()Nr(   r   r   r   r   r   r   s   &  r   test_func_return_long_long(FunctionTests.test_func_return_long_long   s?    hhoo-.llnQe$r   c                    V P                   P                  4       pVP                  R 4       V P                  VP	                  4       ^ ,          4       R# )zselect returnnan()N)r   r   r   assertIsNoner   r8   r   s   & r   test_func_return_nan"FunctionTests.test_func_return_nan   s8    hhoo()#,,.+,r   r-   	msg_regexc                L   V P                   P                  4       pV P                  \        P                  4      ;_uu_ 4       pVP                  R 4       VP                  4        RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)zselect raiseexception()N&user-defined function raised exception
r   r   assertRaisesr   r   r   r   r   rs   	exceptionr8   r   cms   &  r   test_func_exception!FunctionTests.test_func_exception  sk    hhoov66772KK12LLN 8 	R\\*,TU 87s   "BB#	r0   c                    V P                   P                  4       pV P                  \        4      ;_uu_ 4        VP	                  R 4       VP                  4        RRR4       R#   + '       g   i     R# ; i)zselect memoryerror()N)r   r   r  r/   r   r   r  s   & r   test_func_memory_error$FunctionTests.test_func_memory_error	  sH    hhoo{++KK./LLN ,+++s   "A$$A5	r3   c                   V P                   P                  4       pV P                  \        P                  4      ;_uu_ 4        VP                  R 4       VP                  4        RRR4       R#   + '       g   i     R# ; i)zselect overflowerror()N)r   r   r  r   	DataErrorr   r   r  s   & r   test_func_overflow_error&FunctionTests.test_func_overflow_error  sN    hhoov//00KK01LLN 1000s   "A..A?	c                    V P                   P                  4       pVP                  R R4       VP                  4       ^ ,          pV P	                  V^4       R# )zselect spam(?, ?)N)r'   r   r
  r   s   &  r   test_any_arguments FunctionTests.test_any_arguments  sA    hhoo'0llnQa r   c                    V P                   P                  R 4      pV P                  VP                  4       ^ ,          4       R# )zselect isblob(x'')N)r   r   
assertTruer   r  s   & r   test_empty_blobFunctionTests.test_empty_blob  s.    hh34q)*r   c                    V P                   P                  R \        R4      34      pV P                  VP	                  4       ^ ,          4       R# )zselect isnone(?)r   N)r   r   ru   r(  r   r  s   & r   test_nan_floatFunctionTests.test_nan_float!  s6    hh1E%L?Cq)*r   c                b    R pV P                  \        WP                  P                  RR4       R# )z1Python int too large to convert to SQLite INTEGERselect spam(?)N)             )r   r2   r   r   )r8   errs   & r   test_too_large_int FunctionTests.test_too_large_int&  s(    A}c883C3C/	=r   c           	         V P                  \        R V P                  P                  R\	        R4      R,          34       R# )z%underlying buffer is not C-contiguousr/  r$   r   N)r   BufferErrorr   r   r   r7   s   &r   test_non_contiguous_blob&FunctionTests.test_non_contiguous_blob+  s5    {F#xx//1A *7 3C 8:	<r   zbuffer.*contiguous)regexc                    V P                  \        P                  4      ;_uu_ 4        V P                  P	                  R 4      pVP                  4        RRR4       R#   + '       g   i     R# ; i)zselect return_noncont_blob()N)r  r   r   r   r   r   r  s   & r   test_return_non_contiguous_blob-FunctionTests.test_return_non_contiguous_blob1  sF    v6677((""#ABCLLN 8777s   ,AA/	c                `    V P                  \        R V P                  P                  RR4       R# )surrogates not allowedr/  N)u   )r   UnicodeEncodeErrorr   r   r7   s   &r   test_param_surrogates#FunctionTests.test_param_surrogates7  s)    13K#xx//1A0	2r   c                  a . oV3R  lpV P                   P                  R^V4       ^*\        3R\        3R\        3R\        3R\        3\        R4      \        3R\        3R\        3R\        3R	\
        3\        \        ^4      4      \
        3\        R	4      \
        3R
\        R
4      3.pV F2  w  r4V P                   P                  RV34      pVP                  4        K4  	  V P                  VS4       R
# )c                 @   < SP                  V \        V 4      34       R # r!   )appendry   )argresultss   &r   append_result5FunctionTests.test_func_params.<locals>.append_result>  s    NNCc+,r   test_paramsl   {C	 l           r   inftextr   u   ˢqˡⁱᵗᵉr$   Nzselect test_params(?)r   )r   r   rt   ru   rs   rz   	bytearrayranger   ry   r   r   r   )r8   rF  datasetro   _r   rE  s   &     @r   test_func_paramsFunctionTests.test_func_params<  s    	-  =A II #& #&5M5\5!SMsO.4euQx %( %(4:
 FC((""#:SFCCLLN  	'*r   c                   \        R R7      pV P                  P                  R^ VRR7       V P                  \        P
                  4      ;_uu_ 4        V P                  P                  R4       R R R 4       R #   + '       g   i     R # ; i)Nreturn_valuenondeterministicFdeterministicz>create index t on test(t) where nondeterministic() is not null)r   r   r   r  r   r   r   r8   mocks   & r   test_func_non_deterministic)FunctionTests.test_func_non_deterministic\  sa    &  !3QE Rv6677HH]^ 8777s   A99B
	c                    \        R R7      pV P                  P                  R^ VRR7        V P                  P                  R4       R #   \        P
                   d    T P                  R4        R # i ; i)NrR  rV  TrU  z;create index t on test(t) where deterministic() is not nullz/Unexpected failure while creating partial index)r   r   r   r   r   r   r   rW  s   & r   test_func_deterministic%FunctionTests.test_func_deterministicb  sd    &  !T N	IHHZ[&& 	IIIGH	Is   A
 
&A43A4c                    V P                  \        4      ;_uu_ 4        V P                  P                  R ^ \        R4       RRR4       R#   + '       g   i     R# ; i)rV  TN)r  	TypeErrorr   r   rt   r7   s   &r   $test_func_deterministic_keyword_only2FunctionTests.test_func_deterministic_keyword_onlyj  s:    y))HH$$_adC *)))s   #AA	c                    R  p\        4       ;_uu_ 4       pVP                  R^V4       V! R4      p??V.pVP                  V4       ??\        4        RRR4       R#   + '       g   i     R# ; i)c                     R # r!   r   )ts   &r   md5sum=FunctionTests.test_function_destructor_via_gc.<locals>.md5sumq  s    r   md5z(create table lang (name, first_appeared)N)r   r   rC  r   )r8   re  destrN   ys   &    r   test_function_destructor_via_gc-FunctionTests.test_function_destructor_via_gcn  sa    	 $  62?@AAHHQK!L s   >AA/	c                >   V P                   P                  4       pR pR Ff  pV P                   P                  R^ V3R l4       V P                  \        P
                  V4      ;_uu_ 4        VP                  R4       RRR4       Kh  	  R#   + '       g   i     K}  ; i)string or blob too biglargeintc                     V # r!   r   )values   &r   r   >FunctionTests.test_func_return_too_large_int.<locals>.<lambda>  s    r   zselect largeint()N)l            l        l            )r   r   r   r   r   r!  r   )r8   r   r   rp  s   &   r   test_func_return_too_large_int,FunctionTests.test_func_return_too_large_int  sr    hhoo&+EHH$$Z4MN''(8(8#>>/0 ?> ,>>>s   +BBr=  c                <   V P                   P                  4       pV P                   P                  R ^\        4       R FF  pV P	                  \
        P                  4      ;_uu_ 4        VP                  RV34       RRR4       KH  	  R#   + '       g   i     K]  ; i)pychrzselect pychr(?)N)i  i  )r   r   r   chrr  r   r   r   )r8   r   rp  s   &  r   %test_func_return_text_with_surrogates3FunctionTests.test_func_return_text_with_surrogates  sl    hhoo  !S1#E""6#:#:;;-x8 <; $;;;s   (B

Bzrequires 64bit platformF)sizememusedry_runc                8   V P                   P                  4       pR Fe  pV P                   P                  R^ V3R l4       V P                  \        P
                  4      ;_uu_ 4        VP                  R4       RRR4       Kg  	  R#   + '       g   i     K|  ; i)r   	largetextc                     R V ,          # )br   ry  s   &r   r   ?FunctionTests.test_func_return_too_large_text.<locals>.<lambda>  s    sTzr   zselect largetext()Nir(   r   r   r   r  r   r!  r   r8   ry  r   s   && r   test_func_return_too_large_text-FunctionTests.test_func_return_too_large_text  sm     hhoo"DHH$$[!5QR""6#3#34401 54 #444   (BBc                8   V P                   P                  4       pR Fe  pV P                   P                  R^ V3R l4       V P                  \        P
                  4      ;_uu_ 4        VP                  R4       RRR4       Kg  	  R#   + '       g   i     K|  ; i)r   	largeblobc                     R V ,          # )   br   r  s   &r   r   ?FunctionTests.test_func_return_too_large_blob.<locals>.<lambda>  s    td{r   zselect largeblob()Nr  r  r  s   && r   test_func_return_too_large_blob-FunctionTests.test_func_return_too_large_blob  sm     hhoo"DHH$$[!5RS""6#3#34401 54 #444r  c                   a  S P                   P                  R ^ V 3R l4       RpS P                  \        P                  VS P                   P
                  R4       R# )	badreturnc                     < S # r!   r   r7   s   r   r   >FunctionTests.test_func_return_illegal_value.<locals>.<lambda>  s    r   r  zselect badreturn()N)r   r   r   r   r   r   )r8   r   s   f r   test_func_return_illegal_value,FunctionTests.test_func_return_illegal_value  sG      a>6v66#xx//1E	Gr   c                   R pR pV P                  \        V4      ;_uu_ 4       pV P                  P                  R^ VR7       RRR4       V P	                  XP
                  \        4       V P                  \        V4      ;_uu_ 4       pV P                  P                  R^ VR7       RRR4       V P	                  VP
                  \        4       V P                  \        V4      ;_uu_ 4       pV P                  P                  R^ VR7       RRR4       V P	                  VP
                  \        4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LX; i)zPassing keyword arguments 'name', 'narg' and 'func' to _sqlite3.Connection.create_function\(\) is deprecated. Parameters 'name', 'narg' and 'func' will become positional-only in Python 3.15.c                      R # r!   r   r   r   r   noop2FunctionTests.test_func_keyword_args.<locals>.noop  s    r   r  )funcN)nargr  )namer  r  )assertWarnsRegexDeprecationWarningr   r   r   filename__file__)r8   r8  r  r  s   &   r   test_func_keyword_args$FunctionTests.test_func_keyword_args  s   / 		 ""#5u==HH$$VQT$: >h/""#5u==HH$$V!$$? >h/""#5u==HH$$&qt$D >h/ >= >= >=s#   D7	E
.E7E	
E	E-	r   N        r(   )4r@   rA   rB   rC   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r	   ZeroDivisionErrorr  r/   r  r2   r"  r%  r)  r,  r2  r6  r5  r:  r?  rO  rY  r\  r`  rj  rr  r>  rw  unittest
skipUnlesssysmaxsizer   r  r  r  r  rD   rE   rF   s   @r   r   r      s    6.A6
(%(%"%$'%-
 &2GHV IV [,>? @ ].BC D!++
=
< [(<= >
2
+@_ID" ]#1 $1 ')AB9 C9 u,.GHU1e42 5 I2 u,.GHU1e42 5 I2G0 0r   r   c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	WindowSumInti  c                    ^ V n         R# r   countr7   s   &r   r9   WindowSumInt.__init__  s	    
r   c                8    V ;P                   V,          un         R # r!   r  r8   rp  s   &&r   rO   WindowSumInt.step      

e
r   c                    V P                   # r!   r  r7   s   &r   rp  WindowSumInt.value      zzr   c                8    V ;P                   V,          un         R # r!   r  r  s   &&r   inverseWindowSumInt.inverse  r  r   c                    V P                   # r!   r  r7   s   &r   r>   WindowSumInt.finalize  r  r   r  N)r@   rA   rB   rC   r9   rO   rp  r  r>   rD   rE   rF   s   @r   r  r    s#      r   r  c                       ] tR tRtRtR# )	BadWindowi  r   N)r@   rA   rB   rC   rD   r   r   r   r  r    s    r   r  zRequires SQLite 3.25.0 or newerc                      a  ] tR tRt o R tR tR tR t]! ]	4      R 4       t
]! ]	4      R 4       t]! ]4      R 4       t]! ]4      R	 4       tR
 tR tR tRtV tR# )WindowFunctionTestsi  c                   \         P                  ! R 4      V n        V P                  P                  4       V n        . ROpV P                  ;_uu_ 4        V P                  P                  R4       V P                  P                  RV4       RRR4       . ROV n        RV n        V P                  P                  R^\        4       R#   + '       g   i     LC; i)r   zcreate table test(x, y)zinsert into test values(?, ?)Nz
            select x, %s(y) over (
                order by x rows between 1 preceding and 1 following
            ) as sum_y
            from test order by x
        sumint))a   )r  r,   )c   )d   )er'   ))r  	   )r     )r     )r  r  )r  r  )r   r   r   r   r   r   executemanyexpectedquerycreate_window_functionr  )r8   valuess   & r   r   WindowFunctionTests.setUp  s    >>*-88??$
 XXXHH67HH  !@&I 

 	''!\B! Xs   8CC	c                n    V P                   P                  4        V P                  P                  4        R # r!   )r   r   r   r7   s   &r   r   WindowFunctionTests.tearDown  s    r   c                    V P                   P                  V P                  R ,          4       V P                  V P                   P	                  4       V P
                  4       R# r  N)r   r   r  r   fetchallr  r7   s   &r   test_win_sum_int$WindowFunctionTests.test_win_sum_int  s>    h./**,dmm<r   c                    V P                  \        P                  R 4      ;_uu_ 4        V P                  P	                  RR\
        4       RRR4       R#   + '       g   i     R# ; i)r   
shouldfailNr   )r   r   r   r   r  r  r7   s   &r   test_win_error_on_create,WindowFunctionTests.test_win_error_on_create  sA    ##F$;$;ZHHHH++L$M IHHH   "AA&	c                ~   R F  pV P                  VR7      ;_uu_ 4        \        P                  ! \        V\        R7      ;_uu_ 4        RV 2pV P
                  P                  V^\        4       RV R2pV P                  \        P                  V4      ;_uu_ 4        V P                  P                  V P                  V,          4       V P                  P                  4        RRR4       RRR4       RRR4       K  	  R#   + '       g   i     L&; i  + '       g   i     L1; i  + '       g   i     EK9  ; i)r9   )methside_effectexc_'z' method raised errorN)r9   rO   rp  r  )subTestr   objectr  r  r   r  r   r   r   r   r   r  r  )r8   r  r  r   s   &   r   test_win_exception_in_method0WindowFunctionTests.test_win_exception_in_method  s    :D4((\\,)LL!$=DHH33D!\JdV#89C//0G0GMM((d):;))+ N	 M )( ; NM	 ML )((s=   *D*
ADAD&D.D*DDD'"D**D<c                d   \         P                  ! \        R \        R7      ;_uu_ 4        RpV P                  P                  V^\        4       V P                  P                  V P                  V,          4       V P                  P                  4        RRR4       R#   + '       g   i     R# ; i)r>   r  exception_in_finalizeN)
r   r  r  r  r   r  r   r   r  r  )r8   r  s   & r   test_win_exception_in_finalize2WindowFunctionTests.test_win_exception_in_finalize  sm    
 \\,
	JJ*DHH++D!\BHHTZZ$./HH	 KJJJs   A*BB/	c           
     <    ! R  R4      p ! R R4      p ! R R4      pRV3RV3RV33pV F  w  rVV P                  WVR	7      ;_uu_ 4        R
V 2pV P                  P                  V^V4       V P                  \        P
                  RV R24      ;_uu_ 4        V P                  P                  V P                  V,          4       V P                  P                  4        RRR4       RRR4       K  	  R#   + '       g   i     L; i  + '       g   i     K  ; i)c                   2   a  ] tR tRt o R tR tR tRtV tR# )AWindowFunctionTests.test_win_missing_method.<locals>.MissingValuei  c                    R # r!   r   rM   s   &&r   rO   FWindowFunctionTests.test_win_missing_method.<locals>.MissingValue.step      tr   c                    R # r!   r   rM   s   &&r   r  IWindowFunctionTests.test_win_missing_method.<locals>.MissingValue.inverse      $r   c                    ^*# r   r   r7   s   &r   r>   JWindowFunctionTests.test_win_missing_method.<locals>.MissingValue.finalize      rr   r   N)	r@   rA   rB   rC   rO   r  r>   rD   rE   rF   s   @r   MissingValuer         #&))r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )CWindowFunctionTests.test_win_missing_method.<locals>.MissingInversei  c                    R # r!   r   rM   s   &&r   rO   HWindowFunctionTests.test_win_missing_method.<locals>.MissingInverse.step   r  r   c                    ^*# r   r   r7   s   &r   rp  IWindowFunctionTests.test_win_missing_method.<locals>.MissingInverse.value!      Br   c                    ^*# r   r   r7   s   &r   r>   LWindowFunctionTests.test_win_missing_method.<locals>.MissingInverse.finalize"  r  r   r   N)	r@   rA   rB   rC   rO   rp  r>   rD   rE   rF   s   @r   MissingInverser    r  r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )@WindowFunctionTests.test_win_missing_method.<locals>.MissingStepi$  c                    ^*# r   r   r7   s   &r   rp  FWindowFunctionTests.test_win_missing_method.<locals>.MissingStep.value%  r  r   c                    R # r!   r   rM   s   &&r   r  HWindowFunctionTests.test_win_missing_method.<locals>.MissingStep.inverse&  r  r   c                    ^*# r   r   r7   s   &r   r>   IWindowFunctionTests.test_win_missing_method.<locals>.MissingStep.finalize'  r  r   r   N)	r@   rA   rB   rC   rp  r  r>   rD   rE   rF   s   @r   MissingStepr  $  s     &&))r   r  rO   rp  r  )r  clsr  r  z' method not definedN)
r  r   r  r   r   r   r   r   r  r  )r8   r  r  r  rM  r  r  r  s   &       r   test_win_missing_method+WindowFunctionTests.test_win_missing_method  s    	* 	*
	* 	*
	* 	* [!l#'

 !ID411dV}//a=++F,C,C./v5I,JL LHH$$TZZ$%67HH%%'L 21 !L L 211s&   AD
AC7!D
7DD

Dc                     ! R  R4      pRpV P                   P                  V^V4       V P                  P                  V P                  V,          4       V P                  P                  4        R# )c                   2   a  ] tR tRt o R tR tR tRtV tR# )FWindowFunctionTests.test_win_missing_finalize.<locals>.MissingFinalizei<  c                    R # r!   r   rM   s   &&r   rO   KWindowFunctionTests.test_win_missing_finalize.<locals>.MissingFinalize.step=  r  r   c                    ^*# r   r   r7   s   &r   rp  LWindowFunctionTests.test_win_missing_finalize.<locals>.MissingFinalize.value>  r  r   c                    R # r!   r   rM   s   &&r   r  NWindowFunctionTests.test_win_missing_finalize.<locals>.MissingFinalize.inverse?  r  r   r   N)	r@   rA   rB   rC   rO   rp  r  rD   rE   rF   s   @r   MissingFinalizer  <  s     #&&&r   r  missing_finalizeN)r   r  r   r   r  r  )r8   r  r  s   &  r   test_win_missing_finalize-WindowFunctionTests.test_win_missing_finalize7  sT    
	' 	'
 "''aAd*+r   c                    V P                   P                  R ^R4       V P                  \        P                  V P
                  P                  V P                  R ,          4       R# r  )r   r  r  r   r   r   r   r  r7   s   &r   test_win_clear_function+WindowFunctionTests.test_win_clear_functionF  sF    ''!T:&114883C3C**x/	1r   c                v    ! R  R\         4      pV P                   Uu. uF  q"^ ,          V^,          ^,          3NK  	  ppV P                  P                  R^V4       V P                  P                  V P                  R,          4       V P                  V P                  P                  4       V4       R# u upi )c                   ,   a  ] tR tRt o R tR tRtV tR# )AWindowFunctionTests.test_win_redefine_function.<locals>.RedefinediM  c                F    V ;P                   V^,          ,          un         R# r   Nr  r  s   &&r   rO   FWindowFunctionTests.test_win_redefine_function.<locals>.Redefined.stepN  s    4::#::r   c                F    V ;P                   V^,          ,          un         R# r#  r  r  s   &&r   r  IWindowFunctionTests.test_win_redefine_function.<locals>.Redefined.inverseO  s    djjEAI&=jr   r   N)r@   rA   rB   rC   rO   r  rD   rE   rF   s   @r   	Redefinedr!  M  s     :==r   r'  r  N)	r  r  r   r  r   r   r  r   r  )r8   r'  vr  s   &   r   test_win_redefine_function.WindowFunctionTests.test_win_redefine_functionK  s    	> 	> -1MM:MqqT1Q46NM:''!Y?h./**,h7	 ;s   !B6c                     ! R  R4      pV P                   P                  R^V4       V P                  \        P                  RV P
                  P                  V P                  R,          4       R# )c                   2   a  ] tR tRt o R tR tR tRtV tR# )IWindowFunctionTests.test_win_error_value_return.<locals>.ErrorValueReturniW  c                    R # r!   r   r7   s   &r   r9   RWindowFunctionTests.test_win_error_value_return.<locals>.ErrorValueReturn.__init__X  s    r   c                    R # r!   r   rM   s   &&r   rO   NWindowFunctionTests.test_win_error_value_return.<locals>.ErrorValueReturn.stepY  r  r   c                    R# )r'   r0  r   r7   s   &r   rp  OWindowFunctionTests.test_win_error_value_return.<locals>.ErrorValueReturn.valueZ  s    G^r   r   N)	r@   rA   rB   rC   r9   rO   rp  rD   rE   rF   s   @r   ErrorValueReturnr-  W  s     $#++r   r4  err_val_retrm  N)r   r  r   r   r!  r   r   r  )r8   r4  s   & r   test_win_error_value_return/WindowFunctionTests.test_win_error_value_returnV  sW    	, 	,
 	''q:JKv//1I#xx//m1K	Mr   )r   r   r  r  N)r@   rA   rB   rC   r   r   r  r  r	   r  r  r  AttributeErrorr  r  r  r)  r6  rD   rE   rF   s   @r   r  r    s     C<=N Y	,  	, Y     ^$( %(< ^$ %1
	8M Mr   r  c                      a  ] tR tRt o R tR tR t]! ]RR7      R 4       t	R t
]! ]R	R7      R
 4       t]! ]RR7      R 4       t]! ]RR7      R 4       tR tR tR tR tR tR tR tR tR tR tRtV tR# )AggregateTestsia  c           
     D   \         P                  ! R 4      V n        V P                  P                  4       pVP	                  R4       VP	                  RR^RR\        R4      34       VP                  4        V P                  P                  R^\        4       V P                  P                  R^\        4       V P                  P                  R	^\        4       V P                  P                  R
^\        4       V P                  P                  R^\        4       V P                  P                  R^\        4       V P                  P                  RR\        4       V P                  P                  R^\        4       V P                  P                  R^\         4       R# )r   z
            create table test(
                t text,
                i integer,
                f float,
                n,
                b blob
                )
            z6insert into test(t, i, f, n, b) values (?, ?, ?, ?, ?)r   r   Nr$   nostep
nofinalizeexcInitexcStepexcFinalize	checkType
checkTypesmysumaggtxtr   )r   r   r   r   r   r   r   create_aggregater5   rI   rR   r\   rd   rl   r   r   r   r  s   & r   r   AggregateTests.setUpb  s)   >>*-hhoo  	 	LAtT:g#68	:		!!(Az:!!,>B!!)Q0CD!!)Q0CD!!-4KL!!+q-@!!,NC!!'1g6!!(Ax8r   c                :    V P                   P                  4        R # r!   r   r7   s   &r   r   AggregateTests.tearDown|  r   r   c                    V P                  \        P                  R 4      ;_uu_ 4        V P                  P	                  RR\
        4       RRR4       R#   + '       g   i     R# ; i)r   r   Nr   )r   r   r   r   r   r   r7   s   &r   test_aggr_error_on_create(AggregateTests.test_aggr_error_on_create  sA    ##F$;$;ZHHHH$$UD': IHHHr  r5   r  c                ,   V P                   P                  4       pV P                  \        P                  4      ;_uu_ 4       pVP                  R 4       RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)zselect nostep(t) from testNz2user-defined aggregate's 'step' method not defined)	r   r   r  r   r   r   r   rs   r  r  s   &  r   test_aggr_no_step AggregateTests.test_aggr_no_step  sc    hhoov66772KK45 8R\\*M	O 87s   BB	c                   V P                   P                  4       pR pV P                  \        P                  V4      ;_uu_ 4        VP                  R4       VP                  4       ^ ,          pRRR4       R#   + '       g   i     R# ; i)z6user-defined aggregate's 'finalize' method not definedzselect nofinalize(t) from testN)r   r   r   r   r   r   r   )r8   r   r   ro   s   &   r   test_aggr_no_finalize$AggregateTests.test_aggr_no_finalize  s]    hhooF##F$;$;SAAKK89,,.#C BAAAs   )A88B		rR   c                Z   V P                   P                  4       pV P                  \        P                  4      ;_uu_ 4       pVP                  R 4       VP                  4       ^ ,          pRRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)zselect excInit(t) from testNz7user-defined aggregate's '__init__' method raised errorr  r8   r   r  ro   s   &   r   test_aggr_exception_in_init*AggregateTests.test_aggr_exception_in_init  sr    hhoov66772KK56,,.#C 8 	R\\*,ef 87   )BB*	r\   c                Z   V P                   P                  4       pV P                  \        P                  4      ;_uu_ 4       pVP                  R 4       VP                  4       ^ ,          pRRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)zselect excStep(t) from testNz3user-defined aggregate's 'step' method raised errorr  rS  s   &   r   test_aggr_exception_in_step*AggregateTests.test_aggr_exception_in_step  sr    hhoov66772KK56,,.#C 8 	R\\*,ab 87rV  rd   c                Z   V P                   P                  4       pV P                  \        P                  4      ;_uu_ 4       pVP                  R 4       VP                  4       ^ ,          pRRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)zselect excFinalize(t) from testNz7user-defined aggregate's 'finalize' method raised errorr  rS  s   &   r   test_aggr_exception_in_finalize.AggregateTests.test_aggr_exception_in_finalize  sr    hhoov66772KK9:,,.#C 8 	R\\*,ef 87rV  c                    V P                   P                  4       pVP                  R R\        4       34       VP	                  4       ^ ,          pV P                  V^4       R# )zselect checkTypes('str', ?, ?)r   N)r   r   r   rs   r   r   r   s   &  r   test_aggr_check_param_str(AggregateTests.test_aggr_check_param_str  sG    hhoo4ucenEllnQa r   c                    V P                   P                  4       pVP                  R R4       VP                  4       ^ ,          pV P	                  V^4       R# )zselect checkType('int', ?)Nr   r
  r   s   &  r   test_aggr_check_param_int(AggregateTests.test_aggr_check_param_int  sA    hhoo0%8llnQa r   c                    V P                   P                  4       pVP                  R R4       VP                  4       ^ ,          pV P	                  V^4       R# )zselect checkTypes('int', ?, ?)N)r      r
  r   s   &  r   test_aggr_check_params_int)AggregateTests.test_aggr_check_params_int  sA    hhoo4h?llnQa r   c                    V P                   P                  4       pVP                  R R4       VP                  4       ^ ,          pV P	                  V^4       R# )zselect checkType('float', ?)Nr   r
  r   s   &  r   test_aggr_check_param_float*AggregateTests.test_aggr_check_param_float  sA    hhoo2G<llnQa r   c                    V P                   P                  4       pVP                  R R4       VP                  4       ^ ,          pV P	                  V^4       R# )zselect checkType('None', ?)Nr!   r
  r   s   &  r   test_aggr_check_param_none)AggregateTests.test_aggr_check_param_none  sA    hhoo17;llnQa r   c                    V P                   P                  4       pVP                  R \        R4      34       VP	                  4       ^ ,          pV P                  V^4       R# )zselect checkType('blob', ?)r$   N)r   r   r   r   r   r   r   s   &  r   test_aggr_check_param_blob)AggregateTests.test_aggr_check_param_blob  sI    hhoo1Jw4G3IJllnQa r   c                    V P                   P                  4       pVP                  R 4       VP                  R. RO4       VP                  R4       VP	                  4       ^ ,          pV P                  V^<4       R# )zdelete from testzinsert into test(i) values (?)zselect mysum(i) from testN))
   )   )   )r   r   r   r  r   r   r   s   &  r   test_aggr_check_aggr_sum'AggregateTests.test_aggr_check_aggr_sum  s\    hhoo&'8:OP/0llnQb!r   c                    V P                   P                  R 4      pVP                  4       ^ ,          pV P                  V4       R# )z1select mysum(i) from (select 1 as i) where i == 0N)r   r   r   r  r   s   &  r   test_aggr_no_match!AggregateTests.test_aggr_no_match  s5    hhRSllnQ#r   c                0   V P                   P                  4       pR Fa  pV P                  VR7      ;_uu_ 4        VP                  RV34       VP	                  4       ^ ,          pV P                  W24       RRR4       Kc  	  R#   + '       g   i     Kx  ; i)r   r   zselect aggtxt(?) from testN)r   r   )r   r   r  r   r   r   )r8   r   r   ro   s   &   r   test_aggr_textAggregateTests.test_aggr_text  sn    hhoo$C#&&83&AllnQ'  * '& %&&&s   <BBc                   R pV P                  \        V4      ;_uu_ 4       pV P                  P                  R^\        R7       RRR4       V P                  XP                  \        4       V P                  \        V4      ;_uu_ 4       pV P                  P                  R^\        R7       RRR4       V P                  VP                  \        4       V P                  \        V4      ;_uu_ 4       pV P                  P                  R^ \        R7       RRR4       V P                  VP                  \        4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     LY; i)zPassing keyword arguments 'name', 'n_arg' and 'aggregate_class' to _sqlite3.Connection.create_aggregate\(\) is deprecated. Parameters 'name', 'n_arg' and 'aggregate_class' will become positional-only in Python 3.15.test)aggregate_classN)n_argr~  )r  r  r~  )r  r  r   rE  r   r   r  r  r8   r8  r  s   &  r   test_agg_keyword_args$AggregateTests.test_agg_keyword_args  s   / 	 ""#5u==HH%%fa%J >h/""#5u==HH%%fAx%P >h/""#5u==HH%%66> & @ > 	h/ >== >= >=s#   #E 
#E3#E' E	E$	'E7	r  N)r@   rA   rB   rC   r   r   rJ  r	   r8  rM  rP  r  rT  rX  r[  r^  ra  re  rh  rk  rn  rt  rw  rz  r  rD   rE   rF   s   @r   r:  r:  a  s     94; ^|<O =O$ &2GHg Ig &2GHc Ic &2KLg Mg!!!!!!"
+0 0r   r:  c                   T   a  ] tR tRt o ]R 4       tR tR tR tR t	R t
R tR	tV tR
# )AuthorizerTestsi  c                    V \         P                  8w  d   \         P                  # VR 8X  g   VR8X  d   \         P                  # \         P                  # c2t2)r   SQLITE_SELECTSQLITE_DENY	SQLITE_OKactionarg1arg2dbnamesources   &&&&&r   authorizer_cbAuthorizerTests.authorizer_cb  sA    V)))%%%4<44<%%%r   c                    \         P                  ! R 4      V n        V P                  P                  R4       V P                  P	                  R4       V P                  P                  V P                  4       R# )r   z
            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);
            zselect c2 from t2N)r   r   r   executescriptr   set_authorizerr  r7   s   &r   r   AuthorizerTests.setUp  sV    >>*-   	 	,- 2 23r   c                :    V P                   P                  4        R # r!   r   r7   s   &r   r   AuthorizerTests.tearDown  r   r   c                   V P                  \        P                  4      ;_uu_ 4       pV P                  P	                  R 4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)select * from t2N
prohibitedr  r   DatabaseErrorr   r   assertInrs   r  r8   r  s   & r   test_table_access!AuthorizerTests.test_table_access  sS    v3344HH/0 5lC$56 54   A33B	c                   V P                  \        P                  4      ;_uu_ 4       pV P                  P	                  R 4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)select c2 from t1Nr  r  r  s   & r   test_column_access"AuthorizerTests.test_column_access  sS    v3344HH01 5lC$56 54r  c                    V P                   P                  R 4       V P                   P                  R4       V P                   P                  R4       R # )Nr  r  )r   r  r   r7   s   &r   test_clear_authorizer%AuthorizerTests.test_clear_authorizer  s:    %+,,-r   c                    R pV P                  \        V4      ;_uu_ 4       pV P                  P                  R R7       RRR4       V P	                  XP
                  \        4       R#   + '       g   i     L2; i)zPassing keyword argument 'authorizer_callback' to _sqlite3.Connection.set_authorizer\(\) is deprecated. Parameter 'authorizer_callback' will become positional-only in Python 3.15.c                      R # r!   r   r   r   r   r   >AuthorizerTests.test_authorizer_keyword_args.<locals>.<lambda>+  s    r   )authorizer_callbackN)r  r  r   r  r   r  r  r  s   &  r   test_authorizer_keyword_args,AuthorizerTests.test_authorizer_keyword_args"  s[     	 ""#5u==HH###E >h/ >=s   A))A9	r  N)r@   rA   rB   rC   staticmethodr  r   r   r  r  r  r  rD   rE   rF   s   @r   r  r    s:        47
7
.

0 
0r   r  c                      a a ] tR tRt o]R 4       t]! ]RR7      V 3R l4       t]! ]RR7      V 3R l4       t	Rt
VtV ;t# )AuthorizerRaiseExceptionTestsi/  c                    V \         P                  8w  d   \        hVR 8X  g   VR8X  d   \        h\         P                  # r  )r   r  
ValueErrorr  r  s   &&&&&r   r  +AuthorizerRaiseExceptionTests.authorizer_cb0  s5    V)))4<44<r   r  r  c                $   < \         SV `  4        R # r!   superr  r8   	__class__s   &r   r  /AuthorizerRaiseExceptionTests.test_table_access8      !#r   c                $   < \         SV `  4        R # r!   r  r  s   &r   r  0AuthorizerRaiseExceptionTests.test_column_access<  r  r   r   )r@   rA   rB   rC   r  r  r	   r  r  r  rD   rE   __classcell__)r  rG   s   @@r   r  r  /  sR         Z?;$ <$ Z?;$ <$ $r   r  c                   0   a  ] tR tRt o ]R 4       tRtV tR# )AuthorizerIllegalTypeTestsi@  c                p    V \         P                  8w  d   R # VR8X  g   VR8X  d   R # \         P                  # )r   r  r  r   r  r  r  s   &&&&&r   r  (AuthorizerIllegalTypeTests.authorizer_cbA  s/    V)))4<44<r   r   Nr@   rA   rB   rC   r  r  rD   rE   rF   s   @r   r  r  @          r   r  c                   0   a  ] tR tRt o ]R 4       tRtV tR# )AuthorizerLargeIntegerTestsiI  c                p    V \         P                  8w  d   R# VR8X  g   VR8X  d   R# \         P                  # )r   r  r  r  r  r  s   &&&&&r   r  )AuthorizerLargeIntegerTests.authorizer_cbJ  s3    V)))L4<44<Lr   r   Nr  rF   s   @r   r  r  I  r  r   r  __main__)r     r   )1r  r  sqlite3r   unittest.mockr   r   test.supportr   r   utilr   r   r	   r   r   r   r   r   r"   r%   r)   r-   r0   r3   r5   rI   rR   r\   rd   rl   r   r   r   TestCaser   r  	Exceptionr  skipIfsqlite_version_infor  r:  r  r  r  r  r@   mainr   r   r   <module>r     s}  0    % / + !     
 
   k0H%% k0\	  		 	 
++j824HM(++ HM4HMVU0X&& U0p30h'' 30l$O $"    /   zMMO r   