403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_sqlite3/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_sqlite3/__pycache__/test_dbapi.cpython-315.opt-2.pyc
R
>lqj�3c�
�]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s
]PH,s]QH0G
s
GsGs]QH0Gs]QH0GsGs]QHGsGsGs]QHXGsGsGsGsGs]QHpGsGs]QHpGsQQ	\O@2s!Q
Q\O@2s"QQ
\O@2s#\OH\%\OLQ2Q2QQ\O@22s'QQ\O@2s(QQ\O@2s)QQ\O@2s*\OV2QQ\O@22s,QQ\O@2s-QQ\O@2s.QQ\O@2s/Q Q!\\O@2s0Q"Q#\O@2s1\2Q$Q%\O@22s2Q&Q'\O@2s3\4Q(6Xc\Oj2P!P!))�)�
SHORT_TIMEOUT�check_disallow_instantiation�requires_subprocess)�
gc_collect)�threading_helper�
import_helper)�SEEK_SET�SEEK_CUR�SEEK_END)�TESTFN�TESTFN_UNDECODABLE�unlink�temp_dir�FakePath)�memory_database�cx_limit)�MemoryDatabaseMixinc�`�\sQs].snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsUsP!)�ModuleTestsc�t�UO[OQQ[O*2P!)z2.0zapilevel is %s, should be 2.0)�assertEqual�sqlite�apilevel��selfs&�1C:\Python315\\Lib\test\test_sqlite3\test_dbapi.py�test_api_level�ModuleTests.test_api_level/s%��������%�8�6�?�?�J�	L�c�x�UO[O.QlQ[O*2P!)rz'threadsafety is %d, should be 0, 1 or 3>r��)�assertInr�threadsafetyrs&r�test_thread_safety�ModuleTests.test_thread_safety3s)���
�
�f�)�)�9�?��)�)�*�	+rc�t�UO[OQQ[O*2P!)�qmarkz%paramstyle is '%s', should be 'qmark')rr�
paramstylers&r�test_param_style�ModuleTests.test_param_style8s+������*�*�G�@��*�*�+�	,rc�P�UO[O[2P!�N)�assertIsSubclassr�Warning�	Exceptionrs&r�test_warning�ModuleTests.test_warning=s�����f�n�n�i�8rc�P�UO[O[2P!r,)r-r�Errorr/rs&r�
test_error�ModuleTests.test_error@s�����f�l�l�I�6rc�d�UO[O[O2P!r,)r-r�InterfaceErrorr3rs&r�test_interface_error� ModuleTests.test_interface_errorCs�����f�3�3�V�\�\�Brc�d�UO[O[O2P!r,)r-r�
DatabaseErrorr3rs&r�test_database_error�ModuleTests.test_database_errorFs�����f�2�2�F�L�L�Arc�d�UO[O[O2P!r,)r-r�	DataErrorr;rs&r�test_data_error�ModuleTests.test_data_errorIs�����f�.�.��0D�0D�Erc�d�UO[O[O2P!r,)r-r�OperationalErrorr;rs&r�test_operational_error�"ModuleTests.test_operational_errorL������f�5�5�v�7K�7K�Lrc�d�UO[O[O2P!r,)r-r�IntegrityErrorr;rs&r�test_integrity_error� ModuleTests.test_integrity_errorOs�����f�3�3�V�5I�5I�Jrc�d�UO[O[O2P!r,)r-r�
InternalErrorr;rs&r�test_internal_error�ModuleTests.test_internal_errorRs�����f�2�2�F�4H�4H�Irc�d�UO[O[O2P!r,)r-r�ProgrammingErrorr;rs&r�test_programming_error�"ModuleTests.test_programming_errorUrFrc�d�UO[O[O2P!r,)r-r�NotSupportedErrorr;rs&r�test_not_supported_error�$ModuleTests.test_not_supported_errorXs�����f�6�6��8L�8L�Mrc	���,QMQMQMQMQMQMQMQMQMQ	MQ
MQMQMQ
MQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQ MQ!MQ"MQ#MQ$MQ%MQ&MQ'MQ(MQ)MQ*MQ+MQ,MQ-MQ.MQ/MQ0MQ1MQ2MQ3MQ4MQ5MQ6MQ7MQ8MQ9MQ:MQ;MQ<MQ=MQ>MQ?MQ@MQAMQBMQCMQDMQEMQFMQGMQHMQIMQJMQKMQLMQMMoUQNQO,*
oU,QPMQQMQRMQSMQTMQUMQVMQWMQXMQYMQZMQ[MQ\MQ]MQ^MQ_MQ`MQaMQbMQcMQdMQeMQfMQgMQhMQiMQjMQkMQlMQmMQnMQoMQpMQqMQrMQsMQtMQuMQvMQwMQxMQyMQzMQ{MQ|MQ}MQ~MQMQ�MQ�MQ�MQ�MQ�MQ�MQ�MQ�M*
o[OQ�6�cU,Q�N*
o[OQ�6�cU,Q�N*
o[OQ�6�cUQ�Q�,*
o[OQ�6�cUQ�Q�,*
o[OQ�6�cU,Q�N*
o[OQ�6�cU,Q�N*
o[OQ�6�cUOQ�2SFD<oUOUQ�59^tt^2UO	[U2PPP2J>	P!)%fhJS9h)��SQLITE_ABORT�SQLITE_ALTER_TABLE�SQLITE_ANALYZE�
SQLITE_ATTACH�SQLITE_AUTH�SQLITE_BUSY�SQLITE_CANTOPEN�SQLITE_CONSTRAINT�SQLITE_CORRUPT�SQLITE_CREATE_INDEX�SQLITE_CREATE_TABLE�SQLITE_CREATE_TEMP_INDEX�SQLITE_CREATE_TEMP_TABLE�SQLITE_CREATE_TEMP_TRIGGER�SQLITE_CREATE_TEMP_VIEW�SQLITE_CREATE_TRIGGER�SQLITE_CREATE_VIEW�SQLITE_CREATE_VTABLE�
SQLITE_DELETE�SQLITE_DENY�
SQLITE_DETACH�SQLITE_DONE�SQLITE_DROP_INDEX�SQLITE_DROP_TABLE�SQLITE_DROP_TEMP_INDEX�SQLITE_DROP_TEMP_TABLE�SQLITE_DROP_TEMP_TRIGGER�SQLITE_DROP_TEMP_VIEW�SQLITE_DROP_TRIGGER�SQLITE_DROP_VIEW�SQLITE_DROP_VTABLE�SQLITE_EMPTY�SQLITE_ERROR�
SQLITE_FORMAT�SQLITE_FULL�SQLITE_FUNCTION�
SQLITE_IGNORE�
SQLITE_INSERT�SQLITE_INTERNAL�SQLITE_INTERRUPT�SQLITE_IOERR�SQLITE_LIMIT_WORKER_THREADS�
SQLITE_LOCKED�SQLITE_MISMATCH�
SQLITE_MISUSE�SQLITE_NOLFS�SQLITE_NOMEM�
SQLITE_NOTADB�SQLITE_NOTFOUND�
SQLITE_NOTICE�	SQLITE_OK�SQLITE_PERM�
SQLITE_PRAGMA�SQLITE_PROTOCOL�SQLITE_RANGE�SQLITE_READ�SQLITE_READONLY�SQLITE_RECURSIVE�SQLITE_REINDEX�
SQLITE_ROW�SQLITE_SAVEPOINT�
SQLITE_SCHEMA�
SQLITE_SELECT�
SQLITE_TOOBIG�SQLITE_TRANSACTION�
SQLITE_UPDATE�SQLITE_WARNING�SQLITE_LIMIT_LENGTH�SQLITE_LIMIT_SQL_LENGTH�SQLITE_LIMIT_COLUMN�SQLITE_LIMIT_EXPR_DEPTH�SQLITE_LIMIT_COMPOUND_SELECT�SQLITE_LIMIT_VDBE_OP�SQLITE_LIMIT_FUNCTION_ARG�SQLITE_LIMIT_ATTACHED� SQLITE_LIMIT_LIKE_PATTERN_LENGTH�SQLITE_LIMIT_VARIABLE_NUMBER�SQLITE_LIMIT_TRIGGER_DEPTH�PARSE_DECLTYPES�PARSE_COLNAMES�SQLITE_ABORT_ROLLBACK�SQLITE_AUTH_USER�SQLITE_BUSY_RECOVERY�SQLITE_BUSY_SNAPSHOT�SQLITE_CANTOPEN_CONVPATH�SQLITE_CANTOPEN_FULLPATH�SQLITE_CANTOPEN_ISDIR�SQLITE_CANTOPEN_NOTEMPDIR�SQLITE_CONSTRAINT_CHECK�SQLITE_CONSTRAINT_COMMITHOOK�SQLITE_CONSTRAINT_FOREIGNKEY�SQLITE_CONSTRAINT_FUNCTION�SQLITE_CONSTRAINT_NOTNULL�SQLITE_CONSTRAINT_PRIMARYKEY�SQLITE_CONSTRAINT_ROWID�SQLITE_CONSTRAINT_TRIGGER�SQLITE_CONSTRAINT_UNIQUE�SQLITE_CONSTRAINT_VTAB�SQLITE_CORRUPT_VTAB�SQLITE_IOERR_ACCESS�SQLITE_IOERR_AUTH�SQLITE_IOERR_BLOCKED�SQLITE_IOERR_CHECKRESERVEDLOCK�SQLITE_IOERR_CLOSE�SQLITE_IOERR_CONVPATH�SQLITE_IOERR_DELETE�SQLITE_IOERR_DELETE_NOENT�SQLITE_IOERR_DIR_CLOSE�SQLITE_IOERR_DIR_FSYNC�SQLITE_IOERR_FSTAT�SQLITE_IOERR_FSYNC�SQLITE_IOERR_GETTEMPPATH�SQLITE_IOERR_LOCK�SQLITE_IOERR_MMAP�SQLITE_IOERR_NOMEM�SQLITE_IOERR_RDLOCK�SQLITE_IOERR_READ�SQLITE_IOERR_SEEK�SQLITE_IOERR_SHMLOCK�SQLITE_IOERR_SHMMAP�SQLITE_IOERR_SHMOPEN�SQLITE_IOERR_SHMSIZE�SQLITE_IOERR_SHORT_READ�SQLITE_IOERR_TRUNCATE�SQLITE_IOERR_UNLOCK�SQLITE_IOERR_VNODE�SQLITE_IOERR_WRITE�SQLITE_LOCKED_SHAREDCACHE�SQLITE_NOTICE_RECOVER_ROLLBACK�SQLITE_NOTICE_RECOVER_WAL�SQLITE_OK_LOAD_PERMANENTLY�SQLITE_READONLY_CANTLOCK�SQLITE_READONLY_DBMOVED�SQLITE_READONLY_RECOVERY�SQLITE_READONLY_ROLLBACK�SQLITE_WARNING_AUTOINDEX�SQLITE_CORRUPT_SEQUENCE�SQLITE_LOCKED_VTAB�SQLITE_CANTOPEN_DIRTYWAL�SQLITE_ERROR_SNAPSHOT�SQLITE_IOERR_CORRUPTFS)�const)r!�r)�SQLITE_IOERR_BEGIN_ATOMIC�SQLITE_IOERR_COMMIT_ATOMIC�SQLITE_IOERR_ROLLBACK_ATOMIC)r!�r)�SQLITE_ERROR_MISSING_COLLSEQ�SQLITE_ERROR_RETRY�SQLITE_READONLY_CANTINIT�SQLITE_READONLY_DIRECTORY)r!�r�r!�r)r!�r)�SQLITE_CANTOPEN_SYMLINK�SQLITE_CONSTRAINT_PINNED�SQLITE_OK_SYMLINK)r!� r)�SQLITE_BUSY_TIMEOUT�SQLITE_CORRUPT_INDEX�SQLITE_IOERR_DATA)r!�"r)r�sqlite_version_info�append�subTest�
assertHasAttr)r�constsr�s&  r�test_module_constants�!ModuleTests.test_module_constants[sT��P
��P
� �P
�
�P
�
�	P
�

�P
�
�
P
�
�P
�
 �P
�
�P
�
"�P
�
"�P
�
'�P
�
'�P
�
)�P
�
&�P
� 
$�!P
�"
!�#P
�$
#�%P
�&
�'P
�(
�)P
�*
�+P
�,
�-P
�.
 �/P
�0
 �1P
�2
%�3P
�4
%�5P
�6
'�7P
�8
$�9P
�:
"�;P
�<
�=P
�>
!�?P
�@
�AP
�B
�CP
�D
�EP
�F
�GP
�H
�IP
�J
�KP
�L
�MP
�N
�OP
�P
�QP
�R
�SP
�T
*�UP
�V
�WP
�X
�YP
�Z
�[P
�\
�]P
�^
�_P
�`
�aP
�b
�cP
�d
�eP
�f
�gP
�h
�iP
�j
�kP
�l
�mP
�n
�oP
�p
�qP
�r
�sP
�t
�uP
�v
�wP
�x
�yP
�z
�{P
�|
�}P
�~
�P
�@
�AP
�B
!�CP
�D
�EP
�F
�GP
�J
"�KP
�L
&�MP
�N
"�OP
�P
&�QP
�R
+�SP
�T
#�UP
�V
(�WP
�X
$�YP
�Z
/�[P
�\
+�]P
�^
)�_P
��b	�$�&6�7�7���9
�#�9
��9
�
#�9
�
#�	9
�

'�9
�
'�
9
�
$�9
�
(�9
�
&�9
�
+�9
�
+�9
�
)�9
�
(�9
�
+�9
�
&�9
� 
(�!9
�"
'�#9
�$
%�%9
�&
"�'9
�(
"�)9
�*
 �+9
�,
#�-9
�.
-�/9
�0
!�19
�2
$�39
�4
"�59
�6
(�79
�8
%�99
�:
%�;9
�<
!�=9
�>
!�?9
�@
'�A9
�B
 �C9
�D
 �E9
�F
!�G9
�H
"�I9
�J
 �K9
�L
 �M9
�N
#�O9
�P
"�Q9
�R
#�S9
�T
#�U9
�V
&�W9
�X
$�Y9
�Z
"�[9
�\
!�]9
�^
!�_9
�`
(�a9
�b
-�c9
�d
(�e9
�f
)�g9
�h
'�i9
�j
&�k9
�l
'�m9
�n
'�o9
�p
'�q9
�9	
��t�%�%��3���
�F�
�%�%��3���
�F��%�%��3��0�2F�G�G�F��%�%��3��1�3J�K�K�F��%�%��3���
�F�
�%�%��3���
�F�
�%�%��3��M�M�2�3��E����E��*�*��"�"�6�5�1�+�*��*�*�*�s�*I	�I 
�I 
c	�2�Qo[OOQ2%c[OoL[O
o[
29^tt^2oUO[OU29^tt^2o[OU2PPP2WOoUOUOU2UOUOQ2PPP2P!)%fhK^9h)%fhP!9h)�unable to open database file�winr^)�sys�platform�
startswithrr�r^r�assertRaisesRegexr3�connect�	exceptionr�sqlite_errorcode�assertStartsWith�sqlite_errorname)r�err_msg�err_code�db�cm�es&     r�test_error_code_on_exception�(ModuleTests.test_error_code_on_exceptions���0���<�<�"�"�5�)�)��3�3�H��-�-�H�
�Z�Z�2��'�'����g�>�>�"����r�"�?����A����Q�/�/��:��!�!�!�"4�"4�6G�H��Z�>�>���Z�Z�s1�)D�C2	�AD�2D
�;D
�=D�D	�D	c	�&�[29^tt^2oU9^tt^2UOQ2PPP2QoUO[OU29^tt^2oUOQ2PPP2WO
oUO
UO[O2UO
UOQ2PPP2P!)%fhK�9h)%fhK9h)%fhP!9h)z&create table t(t integer check(t > 0))zconstraint failedzinsert into t values(-1)r�)
r�executerrrHr
rrr�r
)r�con�errmsgr�excs&    r�%test_extended_error_code_on_exception�1ModuleTests.test_extended_error_code_on_exceptions���
�
�
�#������D�E��(�F��'�'��(=�(=�v�F�F�"����6�7�G��,�,�C����S�1�1�#�;�;�
=����S�1�1�3L�M��
����G�F��	�
�
�sL�C?�C	�2C?�#C,	�5AC?�C)
�"C)
�$C?�,C<
�5C<
�7C?�?D	�D	c
���[29^tt^2o[U[UQ222[U[O2PPP2P!)%fhP!9h)�select 1)rr�typer�Blob�r�cxs& r�test_disallow_instantiation�'ModuleTests.test_disallow_instantiation&s=��
�
�
�"�(��t�B�z�N�/C�D�(��v�{�{�;��
�
�
�s�6A�A%	�A%	c��UO[OQ22UO[OQ22P!)zselect tzcreate table t(t);)�assertFalser�complete_statement�
assertTruers&r�test_complete_statement�#ModuleTests.test_complete_statement+s3������2�2�:�>�?�����1�1�2F�G�Hr�)�__name__�
__module__�__qualname__�__firstlineno__rr$r)r0r4r8r<r@rDrIrMrQrUrrrr"r(�__static_attributes__�__classdictcell__��
__classdict__s@rrr.ss����L�+�
,�
9�7�C�B�F�M�K�J�M�N�o2�bI�
N�<�
I�Irrc��`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsUs P!)�ConnectionTests�0c���[OQ2UmUOO2oUO	Q2UO	QQ2UO2P!)�:memory:z4create table test(id integer primary key, name text)�!insert into test(name) values (?)��foo)rr	r!�cursorr�close�r�cus& r�setUp�ConnectionTests.setUp2sG���.�.��,���
�W�W�^�^�
��
�
�
�I�J�
�
�
�6��A�
���
rc�<�UOO2P!r,�r!r<rs&r�tearDown�ConnectionTests.tearDown9������
�
�rc�<�UOO2P!r,�r!�commitrs&r�test_commit�ConnectionTests.test_commit<s�������rc�p�UOO2UOO2P!r,rGrs&r�test_commit_after_no_changes�,ConnectionTests.test_commit_after_no_changes?s ��	
�����������rc�<�UOO2P!r,�r!�rollbackrs&r�
test_rollback�ConnectionTests.test_rollbackFs�������rc�p�UOO2UOO2P!r,rOrs&r�test_rollback_after_no_changes�.ConnectionTests.test_rollback_after_no_changesIs$��	
�����������rc�<�UOO2oP!r,�r!r;r=s& r�test_cursor�ConnectionTests.test_cursorPs��
�W�W�^�^�
�rc��QoUO[O29^tt^2[OU2PPP2P!)%fhP!9h)z/foo/bar/bla/23534/mydb.db)�assertRaisesrrCr	)r�YOU_CANNOT_OPEN_THISs& r�test_failed_open� ConnectionTests.test_failed_openSs;��;��
�
�
�v�6�6�
7�
7��N�N�/�0�8�
7�
7�
7�s�A�A	�A	c�<�UOO2P!r,rBrs&r�
test_close�ConnectionTests.test_closeXrErc	���QoUOO2oUOU2oUOO2UO	[
OUO2UO	[
OUOU2UO	[
OUOU,2UO	[
OUOU2UO	[
OUOOU2UO	[
OUOOU,2UO	[
OUOOU2UO	[
OUOOQ]Q2UO	[
OUOO2UO	[
O29^tt^2UO9^tt^2PPP2PPP2P!)%fhK9h)%fhP!9h)r�tc��U!r,r*��xs&r�<lambda>�6ConnectionTests.test_use_after_close.<locals>.<lambda>is��Qr)r!r;rr<r[rrP�fetchall�executemany�
executescript�create_function)r�sqlr>�ress&   r�test_use_after_close�$ConnectionTests.test_use_after_close[s�����
�W�W�^�^�
���j�j��o�����
�
�����&�1�1�3�<�<�@����&�1�1�2�:�:�s�C����&�1�1�2�>�>�3��K����&�1�1�2�3C�3C�S�I����&�1�1�4�7�7�?�?�C�H����&�1�1��'�'�-�-�s�B�	8����&�1�1�4�7�7�3H�3H�#�N����&�1�1��'�'�1�1�3��;�	H����&�1�1�4�7�7�>�>�B�
�
�
�v�6�6�
7�
7�������8�
7����8�
7�
7�s0�(I$�=I	�?I$�I!
�I!
�I$�$I5	�-I5	c��UOUOO[O2UOUOO[O2UOUOO
[O
2UOUOO[O2UOUOO[O2UOUOO[O2UOUOO[O2UOUOO[O2UOUOO[O2UOUOO[O2P!r,)
rr!r.rr3r7r;r?rCrHrLrPrTrs&r�test_exceptions�ConnectionTests.test_exceptionsos:����������&�.�.�9������������5�������/�/��1F�1F�G�������.�.��0D�0D�E�������*�*�F�,<�,<�=�������1�1�6�3J�3J�K�������/�/��1F�1F�G�������.�.��0D�0D�E�������1�1�6�3J�3J�K�������2�2�F�4L�4L�Mrc���[29^tt^2oUO2oUOUOP
2UO	Q2UOUOP
2UO	QQ2UOUOP	2UO	QQ,2UO2oUOUOP	2UO
2UOUOP
2UO	QQ,2UO2oUOUOP
2UO2PPP2P!)%fhP!9h)Fz?create table transactiontest(id integer primary key, name text)z,insert into transactiontest(name) values (?)r:z-select name from transactiontest where name=?r9)rr;r�in_transactionr�fetchonerHr<)rr!r>�rows&   r�test_in_transaction�#ConnectionTests.test_in_transaction|s��
�
�
�"�����B����R�.�.��6��J�J�X�Y����R�.�.��6��J�J�E�x�P����R�.�.��5��J�J�F���P��+�+�-�C����R�.�.��5��I�I�K����R�.�.��6��J�J�F���P��+�+�-�C����R�.�.��6��H�H�J��
�
�
�s�EE � E1	�)E1	c��UO[29^tt^2P	UOmPPP2P!)%fhP!9h)T)r[�AttributeErrorr!rurs&r�test_in_transaction_ro�&ConnectionTests.test_in_transaction_ro�s.��
�
�
�~�
.�
.�%)�D�G�G�"�/�
.�
.�
.�s�;�A	�A	c�2�,QNoSFDvoUOUQ59^tt^2UOUOU2UO[	[
U2[	UOU22PPP2Jx	P!)%fhJ�9h)r?)r)	r?r;r3rHr7rTrCrPr.)r�r�r!�assertIs�getattrr)r�
exceptionsrs&  r�test_connection_exceptions�*ConnectionTests.test_connection_exceptions�sl��

�
��C����#��&�&��"�"�4�7�7�C�0��
�
�g�f�c�2�G�D�G�G�S�4I�J�'�&��&�&�&�s�AB	�B
�B
c��UOO2UO[O29^tt^2UOO2PPP2P!)%fhP!9hr,)r!r<r[rrP�	interruptrs&r�test_interrupt_on_closed_db�+ConnectionTests.test_interrupt_on_closed_db�sE�����
�
��
�
�
�v�6�6�
7�
7��G�G����8�
7�
7�
7�s�A(�(A9	�1A9	c�Z�UOUOO22P!r,)�assertIsNoner!r�rs&r�test_interrupt�ConnectionTests.test_interrupt�s�����$�'�'�+�+�-�.rc��[Q2FDHoUOOQU02oUOUO	2]*U2JJ	P!)��zselect )�ranger!rrrv)r�nr>s&  r�test_drop_unused_refs�%ConnectionTests.test_drop_unused_refs�sC���s��A������7�1�#��/�B����R�[�[�]�1�-�q�1�rc��[OoUOOU2o]
oUOO	V2oUOV$2UOUOOU2U2QoUO
[OUUOOQ2UOO	V2P!SOO	X2h9h)�
�query string is too largezselect 1 as '16')	rr�r!�getlimit�setlimitrrr?r)r�category�saved_limit�	new_limit�
prev_limit�msgs&     r�test_connection_limits�&ConnectionTests.test_connection_limits�s����1�1���g�g�&�&�x�0��		4��I����)�)�(�>�J����[�5����T�W�W�-�-�h�7��C�-�C��"�"�6�#3�#3�S�#'�7�7�?�?�4F�
H�
�G�G���X�3��D�G�G���X�3�s�BC�C9c���QoQoUO[OUUOOU2UO[OUUOO
U]2P!)z'category' is out of boundsiW)rrrPr!r�r�)rr��cats&  r�"test_connection_bad_limit_category�2ConnectionTests.test_connection_bad_limit_category�s\��+�������v�6�6��#�w�w�/�/��	6����v�6�6��#�w�w�/�/��a�	9rc
�4�QoQoSFD�oUOUQ59^tt^2UO[U29^tt^2[UQ5PPP2[29^tt^2oUO[U29^tt^2V4mPPP2UOUOP2PPP2PPP2J�	P!)%fhK�9h)%fhKU9h)%fhKD9h)%fhCJ9h)zJisolation_level string must be '', 'DEFERRED', 'IMMEDIATE', or 'EXCLUSIVE'��level��isolation_level)�BOGUS� �DEFERRE�IMMEDIAT�EXCLUSIV�	DEFERREDS�
IMMEDIATES�
EXCLUSIVES)r�r�
ValueErrorrr�r)rr��levelsr�r!s&    r�(test_connection_init_bad_isolation_level�8ConnectionTests.test_connection_init_bad_isolation_level�s���
�	�	
���E����E��*�*��+�+�J��<�<�#�E�:�=�$�&�&�"��/�/�
�C�@�@�-2�*�A��$�$�R�%7�%7��<�	'�+�*��<�<��A�@��'�&��+�*�*�sk�D	�
C
�D	�,C2
�C�$C2
�6D	�C�C�D	�C/�(C/�*C2
�2D�;D�=D	�D
�D
c��QFD�oUOUQ59^tt^2[UQ59^tt^2oUOUOU2PPP2[29^tt^2oUOUOP2VmUOUOU2PPP2PPP2J�	P!)%fhKw9h)%fhK19h)%fhJ�9h)�r�r�)r��DEFERRED�	IMMEDIATE�	EXCLUSIVEN)r�rrr�)rr�r!s&  r�*test_connection_init_good_isolation_levels�:ConnectionTests.test_connection_init_good_isolation_levels�s���E�E����E��*�*�$�U�;�;�r��$�$�R�%7�%7��?�<�$�&�&�"��$�$�R�%7�%7��<�).�&��$�$�R�%7�%7��?�'�+�*�F�;�;��&�&��+�*�*�sL�C)	�C
�C)	�.?C
�-C)	�C�C�C)	�C&�C&�!C)	�)C:
�2C:
c
�:�[29^tt^2o[Um[OUmUO
2oUOQ2UOQQ[]222UOQ2UO]2Tt,tFDp3MJ	ooSO[9PIcQU2D%cJP
L	P	LQU222SOSTt,tFDp3]*MJ
	toQQ,2UOQ2UOQ2UOQQQ22UO2Tt,tFDp3MJ	ooSO[9PIcQ	U2D%cJP
L	P	LQ	U222SOSTt,tFDp3]*MJ
	toQ
Q,2UO!2PPP2P!ttohttohttohttoh)%fhP!9h)
zcreate table foo (bar)z insert into foo (bar) values (?)c3�F�SF �Do[U21w�	J	P!3hr,)�str��.0�vs& r�	<genexpr>�9ConnectionTests.test_connection_reinit.<locals>.<genexpr>�s��x���x�!�S��V�I�x�s�!zselect bar from fooc3�b�SF �D o[U[O2w�	J"	P!3hr,��
isinstancer�Row�r��rs& rr�r�����4���4�a�
�1�f�j�j� 9� 9�4���(/�0�1r7c3�2�SF �Dp1w�	J
	P!3hr,r*r�s& rr�r��s��*>���*>�Q�D�*>���c3�b�SF �D o[U[O2w�	J"	P!3hr,r�r�s& rr�r��r�r��2�3)�a�b�c�d)r�bytes�text_factoryrr��row_factoryr;rrjr��	fetchmanyr'�allr�__init__rir<)rr!r>r��rowss&    r�test_connection_reinit�&ConnectionTests.test_connection_reinit�s���
�
�
�"�#�B�O�#�Z�Z�B�N�����B��J�J�/�0��N�N�=�8�u�Q�x�8�
:��J�J�,�-�!�|�|�A��/��!�A��D�/��O�O�C�C�H�4�H�C�C�C�H�4�H�H�I����D�1�D�q��d�d�D�1�D�$�<�@��K�K�
�#��J�J�/�0��N�N�=�?�*>�?�
A� "�{�{�}�-�}�!�A�}�D�-��O�O�C�C�H�4�H�C�C�C�H�4�H�H�I����D�1�D�q��d�d�D�1�C��:�>��H�H�J�-�
��0��1��.��1�+�
�
�sa�BH	�G5�&H	�>H	�&H	�8G:�AH	� G?�,H	�H	�&H	�>H�H	�5H	�	H	�H	c���[OQ2oU9^tt^2UOQ2PPP2[29^tt^2oUO	[O
QUOU2UO	[OQUOQQ[]222PPP2P!)%fhK�9h)%fhP!9h)r7�create table t(t)r�#Base Connection.__init__ not calledzinsert into t values(?)c3�2�SF �Dp1w�	J
	P!3hr,r*r�s& rr��=ConnectionTests.test_connection_bad_reinit.<locals>.<genexpr>s��(���(�Q�D�(�r�)
rr	rrrrCr�rPrjr�)rr!rs&  r�test_connection_bad_reinit�*ConnectionTests.test_connection_bad_reinits���
�^�^�J�
'��
�R��J�J�*�+��
�Z�Z�2��"�"�6�#:�#:�#A�#%�;�;��
4�
�"�"�6�#:�#:�#H�#%�>�>�3L�#;�%��(�#;�
=�	�Z��R��
�Z�Z�s$�C�A)C�C	�
C	�C%	�C%	c	�*�[Oo[29^tt^2oUO[Q29^tt^2UOP2PPP2UOU2oU%(oUO
V2UOUOU2U2UO
U2UOUOU22U9^tt^2UOQ2PPP2UO[OQ29^tt^2UOQ2PPP2PPP2P!)%fhK�9h)%fhKo9h)%fhK@9h)%fhP!9h)�unknownz�
                    create table t(t integer primary key);
                    create table u(u, foreign key(u) references t(t));
                �
constraintzinsert into u values(0))r�SQLITE_DBCONFIG_ENABLE_FKEYrrr��	getconfig�	setconfigrr'rkrHr)r�opr!�old�news&    r�test_connection_config�&ConnectionTests.test_connection_configs��
�
/�
/��
�
�
�"��'�'�
�I�>�>����R� �?��,�,�r�"�C��'�C��L�L��!����R�\�\�"�-�s�3��L�L����O�O�B�L�L��,�-���� � �"���
�'�'��(=�(=�|�L�L��
�
�4�5�M�'�
�>�>�����
M�L��'�
�
�sl�F�E	�B
F�"E	�40F�$E.	�6F�E
�E
�F�E+
�$E+
�&F�.E>
�7E>
�9F�F	�
F	c��UO[Q29^tt^2[OQQ2PPP2P!)%fhP!9h)z0connect\(\) takes at most 1 positional argumentsr7��?)r�	TypeErrorrr	rs&r�!test_connect_positional_arguments�1ConnectionTests.test_connect_positional_arguments(sC��
�
#�
#�I�C�E�E��N�N�:�s�+�E�E�E�E�s�A�A	�A	c��UO[29^tt^2[OQ2o=[	2PPP2P!)%fhP!9h�r7)�assertWarns�ResourceWarningrr	rr s& r� test_connection_resource_warning�0ConnectionTests.test_connection_resource_warning-s8��
�
�
�o�
.�
.����
�+�B���L�/�
.�
.�
.�s�"A�A	�A	c�n�]QHGoUUO2oUO[	U2Q2P!)r)�	signaturez(sql, /))�inspectr�r!rr�)rr��sigs&  r�test_connection_signature�)ConnectionTests.test_connection_signature3s'��%����� ������S��:�.r�r!)!r+r,r-r.r?rCrIrLrQrTrXr]r`rorrrxr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r/r0r1s@rr4r40s������������1�
��(N��&*�K�" �
/�2�
4�9�=�2@��2=�6�0,�
�/�/rr4c�.`�\sQsQsnQsQsQsUsP!)�UninitialisedConnectionTests�9c�l�[OO[O2UmP!r,)r�
Connection�__new__r!rs&rr?�"UninitialisedConnectionTests.setUp:s ���#�#�+�+�F�,=�,=�>��rc	�`�U1QkU1QkU1QkU1QkU1QkU1Qk1oSFDGoROUQ59^tt^2RO[OQU2PPP2JI	P!)%fhJ^9h)c�2:�ROO!r,)r!r�rs�rrg�EUninitialisedConnectionTests.test_uninit_operations.<locals>.<lambda>?s���D�G�G�+�+rc�2:�ROO!r,)r!�
total_changesrs�rrgr@s���D�G�G�)�)rc�2:�ROO!r,)r!rurs�rrgrAs���D�G�G�*�*rc�::�ROO2!r,)r!�iterdumprs�rrgrBs���D�G�G�$�$�&rc�::�ROO2!r,rWrs�rrgrCs���D�G�G�N�N�$rc�::�ROO2!r,rBrs�rrgrDs���D�G�G�M�M�Or)�funcr�)r�rrrP)r�funcsrsf  r�test_uninit_operations�3UninitialisedConnectionTests.test_uninit_operations=sg���+�)�*�&�$�#�

���D����4��(�(��&�&�v�'>�'>�'L�'+�-�)�(��(�(�(�s�"A3	�3B
�<B
r)r+r,r-r.r?rr/r0r1s@rrr9s����?�
-�
-rr�	serializezNeeds SQLite serialize APIc�4`�\sQsQsnQsQsQsQsUsP!)�SerializeTests�Mc	�T�[29^tt^2oU9^tt^2UOQ2PPP2UO2oU9^tt^2UOQ2PPP2QoUO[O
U29^tt^2UOQ2PPP2UO
U2UOQ2PPP2P!)%fhK�9h)%fhK�9h)%fhKb9h)%fhP!9h)r�zdrop table tz
no such tablezselect t from t)rrrrrrC�deserialize)rr!�data�regexs&   r�test_serialize_deserialize�)SerializeTests.test_serialize_deserializePs���
�
�
�"����
�
�.�/���<�<�>�D����
�
�>�*��#�E��'�'��(?�(?��G�G��
�
�,�-�H�
�N�N�4� ��J�J�(�)��
����
���H�G���
�
�si�D�C	�"D�C0	�%2D�D	�)*D�C-
�&C-
�(D�0D
�9D
�;D�D
�D
�D�D'	�D'	c�~�[[Q2Q*1[,1[]1[P11oSFD_vq#UOV#Q59^tt^2[	29^tt^2oUOV$OU2PPP2PPP2Ja	P!)%fhK9h)%fhJ�9h)sblob�NN�)r�arg)�BufferError�
memoryviewr�r�rr[r)r�datasetrr$r!s&    r�test_deserialize_wrong_args�*SerializeTests.test_deserialize_wrong_argsas���
�*�W�-�c�2�3�
��O�
��N�
���	
�� �H�C����#��/�/�$�&�&�"��%�%�c�>�>�3�?�'�0�/� �&�&��0�/�/�s0�B+	�%B
�B+	�B(�!B(�#B+	�+B<
�4B<
c	�6�[29^tt^2oQoUO[OU29^tt^2UO	Q2UOQ2PPP2PPP2P!)%fhK9h)%fhP!9h)zfile is not a databaseszcreate table fail(f))rrrr;rr)rr!rs&  r�!test_deserialize_corrupt_database�0SerializeTests.test_deserialize_corrupt_databasemsg��
�
�
�"�,�E��'�'��(<�(<�e�D�D����y�)��
�
�1�2�	E��
�D�D���
�
�s.�+B�#A4	�"B�4B
�=B
�?B�B	�B	r*)	r+r,r-r.rr(r+r/r0r1s@rrrMs����*�"
@�3�3rrc��`�\sQsQsnQsQsQsQs\O\
OQ6HQ2Q2sQ	s
Q
sQs\O\
OQ6HQ2Q2sQ
sQsQsUsP!)�	OpenTests�wzcreate table test(id integer)c���[O[2oUO[U2UO[OOU22[O[OU229^tt^2oUO[OOU22UOUO2PPP2P!)%fhP!9hr,)�os�fsencoder�
addCleanupr
r%�path�exists�
contextlib�closingrr	r'r�_sql�rr4r!s&  r�test_open_with_bytes_path�#OpenTests.test_open_with_bytes_pathzs����{�{�6�"�������%����������-�.�
�
�
����t� 4�
5�
5���O�O�B�G�G�N�N�4�0�1��J�J�t�y�y�!�6�
5�
5�
5�s�A
C&�&C7	�/C7	c���[[2oUO[U2UO	[
OOU22[O[OU229^tt^2oUO[
OOU22UOUO2PPP2P!)%fhP!9hr,)rrr3r
r%r1r4r5r6r7rr	r'rr8r9s&  r�test_open_with_path_like_object�)OpenTests.test_open_with_path_like_object�s������������%����������-�.�
�
�
����t� 4�
5�
5���O�O�B�G�G�N�N�4�0�1��J�J�t�y�y�!�6�
5�
5�
5�s�A
C�C,	�$C,	c���[oU%fUOQ2[UQ2O2[U2U![cSOQS802K/h9h)z)only works if there are undecodable paths�wbz(can't create file with undecodable path )r�skipTest�openr<�OSErrorr
)rr4s& r�get_undecodable_path�OpenTests.get_undecodable_path�se��!����M�M�E�F�	O���t��"�"�$�	�t������	O��M�M�D�T�H�M�N�	O�s�A	�		A,�A,�+A,�win32zskipped on Windowsc��UO2oUO[U2[O[
OU229^tt^2oUO[OOU22UOUO2PPP2P!)%fhP!9hr,)
rDr3r
r6r7rr	r'r1r4r5rr8r9s&  r�test_open_with_undecodable_path�)OpenTests.test_open_with_undecodable_path�sr���(�(�*�������%�
�
�
����t� 4�
5�
5���O�O�B�G�G�N�N�4�0�1��J�J�t�y�y�!�6�
5�
5�
5�s�A
B.�.B?	�7B?	c�D�[oUO[U2Q[OO[OU22*oUO[OOU22[O[OUP	Q529^tt^2oUO[OOU22UO!UO"2PPP2P!)%fhP!9h��file:��uri)rr3r
�urllib�parse�quoter1r2r%r4r5r6r7rr	r'rr8�rr4rNr!s&   r�
test_open_uri�OpenTests.test_open_uri�s����������%�����*�*�2�;�;�t�+<�=�=�����������-�.�
�
�
����s�� =�
>�
>�"��O�O�B�G�G�N�N�4�0�1��J�J�t�y�y�!�?�
>�
>�
>�s�:A
D�D	�D	c���[oUO[U2QU*oUO[O
O
U22[O[OUP	Q529^tt^2oUO[O
O
U22UOUO2PPP2P!)%fhP!9hrK)rr3r
r%r1r4r5r6r7rr	r'rr8rRs&   r�test_open_unquoted_uri� OpenTests.test_open_unquoted_uri�s����������%���n�����������-�.�
�
�
����s�� =�
>�
>�"��O�O�B�G�G�N�N�4�0�1��J�J�t�y�y�!�?�
>�
>�
>�s�	A
C�C.	�&C.	c	�4�[oUO[U2Q[OO[OU22*Q*oUO[OOU22UO[O29^tt^2[OUP	Q5PPP2UO[OOU22[OU2O2UO![OOU22["O$[OUP	Q529^tt^2oUO[O29^tt^2UO'UO(2PPP2PPP2P!)%fhCK9h)%fhK.9h)%fhP!9h)rLz?mode=rorM)rr3r
rOrPrQr1r2r%r4r5r[rrCr	r<r'r6r7rr8rRs&   r�test_open_uri_readonly� OpenTests.test_open_uri_readonly�s=���������%�����*�*�2�;�;�t�+<�=�=�
�J�����������-�.�
�
�
�v�6�6�
7�
7��N�N�3�D�)�8����������-�.����t��"�"�$���������t�,�-�
�
�
����s�� =�
>�
>�"��"�"�6�#:�#:�;�;��
�
�4�9�9�%�<�?�
>�
8�
7�
7��<�;��?�
>�
>�sB�4G�	(H�1G3	�
H�G0	�(G0	�3H
�<H
�>H�H	�H	c���UO2oUO[U2Q[OOU2*o[O[OUP	Q529^tt^2oUO[OOU22UOUO2PPP2P!)%fhP!9hrK)rDr3r
rOrPrQr6r7rr	r'r1r4r5rr8rRs&   r�test_open_undecodable_uri�#OpenTests.test_open_undecodable_uri�s����(�(�*�������%�����*�*�4�0�0��
�
�
����s�� =�
>�
>�"��O�O�B�G�G�N�N�4�0�1��J�J�t�y�y�!�?�
>�
>�
>�s�A
C�C'	�C'	c�8`�U1Qko[[O[2[[2[[O[221FD<oPn[O
V!Q5O
2UORU2J>	P!)c�@:�Un[OQ,UN3-U@!r�)rr)�database�args�kwargs�database_args&*,�r�factory�4OpenTests.test_factory_database_arg.<locals>.factory�s#���#�L��$�$�Z�A�$�A�&�A�Ar)rd)rr1r2rrr	r<r)rrdr`rcs&  @r�test_factory_database_arg�#OpenTests.test_factory_database_arg�si���	B�
 ����V�!4�!�&�)�8�B�K�K��4G�+H�J�H��L��N�N�8�5�;�;�=����\�8�4�	Jrc��[O[OQQ529^tt^2oUO	[U2[O2PPP2P!)%fhP!9h)r7)r`)r6r7rr	rrrr s& r�test_database_keyword�OpenTests.test_database_keyword�sH��
�
�
����
� C�
D�
D�����T�"�X�v�'8�'8�9�E�
D�
D�
D�s�*A)�)A:	�2A:	r*)r+r,r-r.r8r:r=rD�unittest�skipIfrrrHrSrVrYr\rfrir/r0r1s@rr.r.ws�����*�D�"�"�	��_�_�S�\�\�W�,�.B�C�"�D�"�"�"�&� �_�_�S�\�\�W�,�.B�C�"�D�"�
5�:�:rr.c��`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!\"OF\$OJQ@6Q 2Q!2s&Q"s'Q#s(Q$s)Q%s*Q&s+Q's,Q(s-Q)s.Q*s/Q+s0Q,s1Q-s2Q.s3Q/s4Q0s5Q1s6Q2s7Q3s8Q4s9Q5s:Q6s;Q7s<Q8s=Q9s>Q:s?Q;s@Q<sAQ=sBQ>sCQ?sDUsEP!)A�CursorTests��c���[OQ2UmUOO2UmUOOQ2UOOQQ2P!)r7z\create table test(id integer primary key, name text, income number, unique_test text unique)r8r9�rr	r!r;r>rrs&rr?�CursorTests.setUp�sN���.�.��,����'�'�.�.�"��������
6�	
�	
�����;�X�Frc�p�UOO2UOO2P!r,�r>r<r!rs&rrC�CursorTests.tearDown�������
�
�����
�
�rc�>�UOOQ2P!)�delete from test�r>rrs&r�test_execute_no_args� CursorTests.test_execute_no_args�s�������*�+rc���UO[O29^tt^2UOO	Q2PPP2P!)%fhP!9h)zselect asdf)r[rrCr>rrs&r�test_execute_illegal_sql�$CursorTests.test_execute_illegal_sql�s8��
�
�
�v�6�6�
7�
7��G�G�O�O�M�*�8�
7�
7�
7���A�A 	�A 	c�P�QoQoSFDroUOUQ59^tt^2UO[OU29^tt^2UOOU2PPP2PPP2Jt	P!)%fhK9h)%fhJ�9h)z,You can only execute one statement at a time��query)
zselect 1; select 2z)select 1; // c++ comments are not allowedzselect 1; *not a commentzselect 1; -*not a commentzselect 1; /* */ azselect 1; /**/azselect 1; -zselect 1; /zselect 1; -
- select 2zHselect 1;
               -- comment
               select 2
            �r�rrrPr>r)rr�r'r�s&   r� test_execute_multiple_statements�,CursorTests.test_execute_multiple_statements�su��<��
���E����E��*�*��+�+�F�,C�,C�S�I�I��G�G�O�O�E�*�J�+�*��I�I��+�*�*�s/�)B	�B
�+B	�B�
B�B	�B%
�B%
c	���QoSFDAoUOUQ59^tt^2UOOU2PPP2JC	P!)%fhJX9h)�select 1; -- foo barr�)r�zselect 1; --zselect 1; /*zT
            select 5+4;

            /*
            foo
            */
            )r�r>r)rr'r�s&  r�#test_execute_with_appended_comments�/CursorTests.test_execute_with_appended_commentssH��
���E����E��*�*�������&�+�*��*�*�*�s�A	�A
�A
c��UO[29^tt^2UOO]*2PPP2P!)%fhP!9h��*)r[r�r>rrs&r�test_execute_wrong_sql_arg�&CursorTests.test_execute_wrong_sql_args2��
�
�
�y�
)�
)��G�G�O�O�B��*�
)�
)�
)���A�A	�A	c�@�UOOQQ2P!)�insert into test(id) values (?)r�ryrs&r�test_execute_arg_int� CursorTests.test_execute_arg_ints�������9�5�Arc�@�UOOQQ2P!)�#insert into test(income) values (?))gq=
ף��@ryrs&r�test_execute_arg_float�"CursorTests.test_execute_arg_floats�������=�z�Jrc�@�UOOQQ2P!)r8)�Hugoryrs&r�test_execute_arg_string�#CursorTests.test_execute_arg_string!s�������;�Y�Grc��UOOQQ2UOOQUOO12UOO2oUO	U]*Q2P!)r8�Hugoz select name from test where id=?)r�)r>r�	lastrowidrvr�rrws& r�&test_execute_arg_string_with_zero_byte�2CursorTests.test_execute_arg_string_with_zero_byte$s[�������;�]�K������:�T�W�W�=N�=N�<P�Q��g�g��� ������Q���,rc��UO[O29^tt^2oUOO	Q]*2PPP2UO[
WO2Q2P!)%fhK79h)r�z"parameters are of unsupported type)r[rrPr>rrr�r
)rrs& r�test_execute_non_iterable�%CursorTests.test_execute_non_iterable+sV��
�
�
�v�6�6�
7�
7�2��G�G�O�O�=�r�B�8�����R�\�\�*�,P�Q�8�
7�s�A5�5B	�>B	c���UO[O29^tt^2UOO	QQ2PPP2P!)%fhP!9h)r�)��Egon�r[rrPr>rrs&r�test_execute_wrong_no_of_args1�*CursorTests.test_execute_wrong_no_of_args10s;��
�
�
�v�6�6�
7�
7��G�G�O�O�=�|�L�8�
7�
7�
7�s�A�A!	�A!	c���UO[O29^tt^2UOO	Q2PPP2P!)%fhP!9h�r�r�rs&r�test_execute_wrong_no_of_args2�*CursorTests.test_execute_wrong_no_of_args25�9��
�
�
�v�6�6�
7�
7��G�G�O�O�=�>�8�
7�
7�
7�rc���UO[O29^tt^2UOO	Q2PPP2P!)%fhP!9hr�r�rs&r�test_execute_wrong_no_of_args3�*CursorTests.test_execute_wrong_no_of_args3:r�rc���UOOQ2UOOQQ,2UOO2oUOU]*Q2P!)�%insert into test(name) values ('foo')�"select name from test where name=?r:�r>rrvrr�s& r�test_execute_param_list�#CursorTests.test_execute_param_list?sN�������?�@������<�u�g�F��g�g��� ������Q���'rc��QQ2oUOOQ2UOOQU22UOO2oUOU]*Q2P!)c�.`�\sQsQsnQsQsQsUsP!)�2CursorTests.test_execute_param_sequence.<locals>.L�Fc��]!�r r*rs&r�__len__�:CursorTests.test_execute_param_sequence.<locals>.L.__len__Gs��rc��Q!r9r*�rrfs&&r�__getitem__�>CursorTests.test_execute_param_sequence.<locals>.L.__getitem__Is��rr*�r+r,r-r.r�r�r/r0r1s@r�Lr�Fs����
�
�
rr�r�r�r:r�)rr�rws&  r�test_execute_param_sequence�'CursorTests.test_execute_param_sequenceEsZ��	�	�	
�����?�@������<�a�c�B��g�g��� ������Q���'rc��QQ2oUOOQ2UO[29^tt^2UOOQU22PPP2P!)%fhP!9h)c�.`�\sQsQsnQsQsQsUsP!)�:CursorTests.test_execute_param_sequence_bad_len.<locals>.L�Tc��]]*P!r�r*rs&rr��BCursorTests.test_execute_param_sequence_bad_len.<locals>.L.__len__Us���!��rc��[gr,)�AssertionError)�slfrfs&&rr��FCursorTests.test_execute_param_sequence_bad_len.<locals>.L.__getitem__Ws��$�$rr*r�r1s@rr�r�Ts����
�
%�
%rr�r�r�)r>rr[�ZeroDivisionError)rr�s& r�#test_execute_param_sequence_bad_len�/CursorTests.test_execute_param_sequence_bad_lenRsU��	%�	%�	
�����?�@�
�
�
�0�
1�
1��G�G�O�O�@�!�#�F�2�
1�
1�
1�s�"A0�0B	�9B	c�T�QoQoSFDtvq4UOV4Q59^tt^2UO[OU29^tt^2oUOOV42PPP2PPP2Jv	P!)%fhK9h)%fhJ�9h)�	select :azBinding.*is a named parameter�r��params))r�r�)zselect :a, ?, ?�r r#r!)zselect ?, :b, ?r�)zselect ?, ?, :cr�)zselect :a, :b, ?r�r�)rr'r�r�r�rs&     r�%test_execute_named_param_and_sequence�1CursorTests.test_execute_named_param_and_sequence^sy��
��.��$�M�E����E��9�9��+�+�F�,C�,C�S�I�I�R��G�G�O�O�E�2�J�:�9�%�I�I��:�9�9�s/�)B	�B
�-B	�B�B�B	�B'
�B'
c��QFD�vqoUOVQ59^tt^2[O29^tt^2[OQ[2UO
O
V2oUO2voUOVS2PPP2PPP2J�	P!)%fhK9h)%fhJ�9h)�
select ?1, ?2r��error))r��r r#r�)z
select ?2, ?1r�)r#r )	r��warnings�catch_warnings�simplefilter�DeprecationWarningr>rrir)rr�r��expectedr>�actuals&     r�$test_execute_indexed_nameless_params�0CursorTests.test_execute_indexed_nameless_paramsls���(
�#�E�8����E��9�9��,�,�.�.��)�)�'�3E�F�������7�B� �k�k�m�G�F��$�$�V�6�	/�:�9�	(
�
/�.��:�9�9�s0�C	�AB3
�C	�3C�<C�>C	�C
�C
c	��[OoQo[UOU]Q59^tt^2UOOQQ2UO
[OU29^tt^2UOOQQ2PPP2PPP2P!)%fhK9h)%fhP!9h)ztoo many SQL variables)r��limitzselect * from test where id=?z(select * from test where id!=? and id!=?r�r�)rr�rr!r>rrrC)rr�r�s&  r�test_execute_too_many_params�(CursorTests.test_execute_too_many_paramsys����6�6��&��
�d�g�g���
:�
:��G�G�O�O�;�T�B��'�'��(?�(?��E�E������ J� &�(�F�;�
:�E�E��;�
:�
:�s0�AB;�9B(	�B;�(B8
�1B8
�3B;�;C	�C	c���UOOQ2UOOQQQ-2UOO2oUOU]*Q2P!)r��&select name from test where name=:name�namer:r�r�s& r�test_execute_dict_mapping�%CursorTests.test_execute_dict_mapping�sP�������?�@������@�6�5�/�R��g�g��� ������Q���'rc��QQ[2oUOOQ2UOOQU22UOO2oUO	U]*Q2P!)c�(`�\sQsQsnQsQsUsP!)�8CursorTests.test_execute_dict_mapping_mapping.<locals>.D�c��Q!r9r*)r�keys&&r�__missing__�DCursorTests.test_execute_dict_mapping_mapping.<locals>.D.__missing__�s��rr*)r+r,r-r.r�r/r0r1s@r�Dr��s����
�
rr�r�r�r:)�dictr>rrvr)rr�rws&  r�!test_execute_dict_mapping_mapping�-CursorTests.test_execute_dict_mapping_mapping�s\��	��	�	
�����?�@������@�!�#�F��g�g��� ������Q���'rc��UOOQ2UO[O29^tt^2UOOQQQ-2PPP2P!)%fhP!9h)r�z1select name from test where name=:name and id=:idr�r:�r>rr[rrPrs&r�)test_execute_dict_mapping_too_little_args�5CursorTests.test_execute_dict_mapping_too_little_args�sS�������?�@�
�
�
�v�6�6�
7�
7��G�G�O�O�O�RX�Z_�Q`�a�8�
7�
7�
7���A-�-A>	�6A>	c��UOOQ2UO[O29^tt^2UOOQ2PPP2P!)%fhP!9h)r�r�r�rs&r�!test_execute_dict_mapping_no_args�-CursorTests.test_execute_dict_mapping_no_args�sJ�������?�@�
�
�
�v�6�6�
7�
7��G�G�O�O�D�E�8�
7�
7�
7���A*�*A;	�3A;	c��UOOQ2UO[O29^tt^2UOOQQQ-2PPP2P!)%fhP!9h)r�r�r�r:r�rs&r�!test_execute_dict_mapping_unnamed�-CursorTests.test_execute_dict_mapping_unnamed�sP�������?�@�
�
�
�v�6�6�
7�
7��G�G�O�O�@�6�5�/�R�8�
7�
7�
7�rc�<�UOO2P!r,)r>r<rs&rr`�CursorTests.test_close�rErc�,�UOOQ2UOOQ2UOOQ2UOOQ2UOUOO]2P!)rxr�zupdate test set name='bar'�r>rr�rowcountrs&r�test_rowcount_execute�!CursorTests.test_rowcount_execute�s`�������*�+������?�@������?�@������4�5�������)�)�1�-rc��UOOQ2UOUOOP2P!)zselect 5 union select 6r
rs&r�test_rowcount_select� CursorTests.test_rowcount_select�s/��	
�����1�2�������)�)�2�.rc���UOOQ2UOOQ,QN2UOUOO]2P!)rxr8�r��r#�r!)r>rrjrrrs&r�test_rowcount_executemany�%CursorTests.test_rowcount_executemany�sC�������*�+������?�AS�T�������)�)�1�-rzRequires SQLite 3.35.0 or newerc���UOOQ2UOUOO2]*]2UOUOO]2P!)z7update test set name='bar' where name='foo' returning 1)r>rrrvrrs&r�test_rowcount_update_returning�*CursorTests.test_rowcount_update_returning�sQ��	
�����Q�R�������)�)�+�A�.��2�������)�)�1�-rc��UOOQ2UOUOO]2UOOQ2UOUOO]2UOOQ2UOUOO]2P!)zW
            -- foo
            insert into test(name) values ('foo'), ('foo')
        z�
            /* -- messy *r /* /* ** *- *--
            */
            /* one more */ insert into test(name) values ('messy')
        z5/* bar */ update test set name='bar' where name='foo'r
rs&r�#test_rowcount_prefixed_with_comment�/CursorTests.test_rowcount_prefixed_with_comment�s���������	
�	
������)�)�1�-�������	
�
	
������)�)�1�-������O�P�������)�)�1�-rc�F�QoUOOQU2UOUOO]2UOO2UOO
Q2UOUOOP2P!)r z"insert into test(income) values(?)�vacuumr)r>rjrrr!rHr)rrs& r�test_rowcount_vaccuum�!CursorTests.test_rowcount_vaccuum�sn��!�������@�$�G�������)�)�1�-�������������!�������)�)�2�.rc���UOOQ2UOOQ2UO]UOOQQ5P!)r�z"total changes reported wrong value)r�)r>r�
assertLessr!r
rs&r�test_total_changes�CursorTests.test_total_changes�sA�������?�@������?�@�����4�7�7�0�0�6Z��[rc��UOOQ[]d]n2Tt,tFDp1MJ	to2P!ttoh�r�)r>rjr�r�s& r�test_execute_many_sequence�&CursorTests.test_execute_many_sequence�s5�������A�RW�X[�]`�Ra�Cb�Ra�Q�D�Ra�Cb�c��Cbs�
;
c�^�QQ2oUOOQU22P!)c�4`�\sQsQsnQsQsQsQsUsP!)�6CursorTests.test_execute_many_iterator.<locals>.MyIter��c��]UmP!����valuers&rr��?CursorTests.test_execute_many_iterator.<locals>.MyIter.__init__�s	����
rc��U!r,r*rs&r�__iter__�?CursorTests.test_execute_many_iterator.<locals>.MyIter.__iter__�s���rc�~�UO]
6Xc[gU9O]*
tmUO1!�r�)r4�
StopIterationrs&r�__next__�?CursorTests.test_execute_many_iterator.<locals>.MyIter.__next__�s-���:�:��#�'�'��J�J�!�O�J� �J�J�=�(rr3)	r+r,r-r.r�r7r<r/r0r1s@r�MyIterr.�s����
�
�
)�
)rr>r��r>rj)rr>s& r�test_execute_many_iterator�&CursorTests.test_execute_many_iterator�s%��	)�	)�	
�����A�6�8�Lrc�P�QoUOOQU22P!)c3�B �[]2FD	oU1w�	J	P!3hr1)r�)�is r�mygen�6CursorTests.test_execute_many_generator.<locals>.mygen�s����1�X���d�
��s�r�r?)rrEs& r�test_execute_many_generator�'CursorTests.test_execute_many_generator�s ��	�	
�����A�5�7�Krc��UO[29^tt^2UOO]*Q,2PPP2P!)%fhP!9h)r�r�r[r�r>rjrs&r�test_execute_many_wrong_sql_arg�+CursorTests.test_execute_many_wrong_sql_arg�s8��
�
�
�y�
)�
)��G�G����T�F�+�*�
)�
)�
)�s�A�A	�A	c���UO[O29^tt^2UOO	QQ,2PPP2P!)%fhP!9h)zselect ?r)r[rrPr>rjrs&r�test_execute_many_select�$CursorTests.test_execute_many_selects>��
�
�
�v�6�6�
7�
7��G�G���
�T�F�3�8�
7�
7�
7�s�A�A"	�A"	c��UO[29^tt^2UOOQ]*2PPP2P!)%fhP!9hr)rJrs&r�test_execute_many_not_iterable�*CursorTests.test_execute_many_not_iterables7��
�
�
�y�
)�
)��G�G��� E�r�J�*�
)�
)�
)�s�A�A	�A	c��UOOQ2UOOQQ2UOOQQ2UOOQ2,oUOFDoUOU]*2J	UOU]*]2UOU]*]2P!)rxr�zselect id from test order by idr1)�)r>rr�r)r�lstrws&  r�test_fetch_iter�CursorTests.test_fetch_iter	s��������*�+������9�4�@������9�4�@������9�:����7�7�C��J�J�s�1�v�������Q���#�����Q���#rc��UOOQ2UOO2oUOU]*Q2UOO2oUOUP2P!)�select name from testr:r�r�s& r�
test_fetchone�CursorTests.test_fetchones[�������/�0��g�g��� ������Q���'��g�g��� ������d�#rc��UOO2oUO2oUOUP2P!r,)r!r;rvr)r�currws&  r�test_fetchone_no_statement�&CursorTests.test_fetchone_no_statements-���g�g�n�n����l�l�n������d�#rc���UOUOO]2]UOmUOOQ2UOOQ2UOOQ2UOOQ2UOOQ2UOO	2oUO[U2]2P!)r rxz#insert into test(name) values ('A')z#insert into test(name) values ('B')z#insert into test(name) values ('C')rY)rr>�	arraysizerr��len�rrns& r�test_array_size�CursorTests.test_array_size!s���������*�*�A�.������	
�����*�+������=�>������=�>������=�>������/�0��g�g���!������S��1�%rc���Qo[O[UOQ2oUO	[
UQ2UO	[UQ2UO	[V!]*2P!)r rar�������)�	functools�partial�setattrr>r[r�r��
OverflowError)r�
UINT32_MAX�setters&  r�test_invalid_array_size�#CursorTests.test_invalid_array_size2sW��"�
��"�"�7�D�G�G�[�A�����)�V�S�1����*�f�b�1����-��a��@rc��UOO2oUOU,2UOOQ2oUOU,2UOOQ2UOO2oUO[	U2]2UOOQ2UOO]d2oUO[	U2]2UOO]d2oUOU,2UOOQ2UOO]2oUOU,2UOO]d2oUO[	U2]2UOO]d2oUOU,2P!)��rY)r>r�rrrbrcs& r�test_fetchmany�CursorTests.test_fetchmany:sc���g�g���!������b�!��g�g����%������b�!�	
�����/�0��g�g���!������S��1�%�	
�����/�0��g�g����$������S��1�%��g�g����$������b�!�	
�����/�0��g�g����"������b�!��g�g����$������S��1�%��g�g����$������b�!rc���QoUOOoUO[UQ2UO[UQ2UO[
V!]*2P!)r r�rgrh)r>r�r[r�r�rl)rrmr�s&  r�test_invalid_fetchmany�"CursorTests.test_invalid_fetchmanyVsN��"�
��G�G�%�%�	����)�Y��4����*�i��4����-���N�Crc��UOOQ2UOO]dQ5oUO[	U2]2P!)rY)�size)r>rr�rrbrcs& r�test_fetchmany_kw_arg�!CursorTests.test_fetchmany_kw_arg^s>�������/�0��g�g���S��)������S��1�%rc��UOOQ2UOO2oUO[	U2]2UOO2oUOU,2P!�rY)r>rrirrbrcs& r�
test_fetchall�CursorTests.test_fetchallds[�������/�0��g�g��� ������S��1�%��g�g��� ������b�!rc�B�UOO,QN2P!)r!)r!�r2)r>�
setinputsizesrs&r�test_setinputsizes�CursorTests.test_setinputsizesks�������i�(rc�@�UOO]]2P!r1�r>�
setoutputsizers&r�test_setoutputsize�CursorTests.test_setoutputsizens�������a��#rc�>�UOO]*2P!r�r�rs&r�test_setoutputsize_no_column�(CursorTests.test_setoutputsize_no_columnqs�������b�!rc�h�UOUOOUO2P!r,)rr>�
connectionr!rs&r�test_cursor_connection�"CursorTests.test_cursor_connectionts ��������+�+�T�W�W�5rc��UO[29^tt^2QoUOOU2oPPP2P!)%fhP!9h)c��P!r,r*r*rr�f�1CursorTests.test_wrong_cursor_callable.<locals>.fzs��Tr)r[r�r!r;)rr�r]s&  r�test_wrong_cursor_callable�&CursorTests.test_wrong_cursor_callablexs7��
�
�
�y�
)�
)���'�'�.�.��#�C�*�
)�
)�
)�s�A�A	�A	c���QQ2oU2oUO[29^tt^2[OU2oPPP2P!)%fhP!9h)c��\sQsQsQsP!)�0CursorTests.test_cursor_wrong_class.<locals>.Fooi~r*�r+r,r-r.r/r*rr�Foor�~s��4rr�)r[r�r�Cursor)rr�r:r]s&   r�test_cursor_wrong_class�#CursorTests.test_cursor_wrong_class}s<�����e��
�
�
�y�
)�
)��-�-��$�C�*�
)�
)�
)�s�A�A"	�A"	c	�0�QoQFDwoUOUQ59^tt^2UOOUOU2Q2UO	UOO
]2PPP2Jy	P!)%fhJ�9h)z+{} INTO test(id, unique_test) VALUES (?, ?)��	statement)zINSERT OR REPLACE�REPLACE)r r:)r�r>r�formatrr�)rrmr�s&  r�test_last_row_id_on_replace�'CursorTests.test_last_row_id_on_replace�sk��<��9�I����	��2�2�������
�
�9� 5�z�B�� � ����!2�!2�A�6�3�2�:�2�2�2�s�AB	�B
�
B
c��UOOQQ2UOUOO]2UOOQQ2UOUOO]2P!)z2insert or ignore into test(unique_test) values (?))�test)r>rrr�rs&r�test_last_row_id_on_ignore�&CursorTests.test_last_row_id_on_ignore�sf�������@��	�	
������*�*�A�.������@��	�	
������*�*�A�.rc��,oQFCDoQoUOQOU2Q59^tt^2UOOUOU2U12UO	V OO
12UO
[O29^tt^2UOOUOU2U12PPP2UO	V OO
12PPP2CJ	,QNoUOV2P!)%fhKZ9h)%fhCJM9h)�FAILz.INSERT OR {} INTO test(unique_test) VALUES (?)zINSERT OR {}r�)r��ABORT�ROLLBACK)�r�r#r��r�r!r��r�r�r�)
r�r�r>rr�r�r[rrHr)r�resultsr�rmr�s&    r�test_last_row_id_insert_o_r�'CursorTests.test_last_row_id_insert_o_r�s�����6�I�B�C�����(=�(=�i�(H��I�I�������
�
�9� 5�	�|�D����	�7�7�+<�+<�=�>��&�&�v�'<�'<�=�=��G�G�O�O�C�J�J�y�$9�I�<�H�>����	�7�7�+<�+<�=�>�J�I�7�
��
	
����+�>�=��J�I�I�s0�A:E	�0-D/
�.E	�/D?�8D?�:E	�E
�E
c�2�QoUOOU2o[UO2oUOOQ2UOOU2o[UO2oUO	VC*
]2P!)zselect * from testzalter table test add newcol)r>rrb�descriptionr)r�selectrn�	old_count�	new_counts&    r�test_column_count�CursorTests.test_column_count�sk��%���g�g�o�o�f�%������(�	������5�6��g�g�o�o�f�%������(�	�����.��2rc���[]2Tt,tFDpOOQ2MJ	ooSFD$oUOUO	2Q,2J&	P!ttoh)r!rr�)r�r!rrri)r�_�cursorsr>s&   r�#test_same_query_in_multiple_cursors�/CursorTests.test_same_query_in_multiple_cursors�sM��8=�a��A��1�7�7�?�?�:�.���A��B����R�[�[�]�T�F�3���Bs�%A"�r>r!)r!�#r)Fr+r,r-r.r?rCrzr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr`rrrrkrlrr�rrr"r&r*r@rGrKrNrQrVrZr^rdrorsrvrzr~r�r�r�r�r�r�r�r�r�r�r�r/r0r1s@rrnrn�so����G��,�+�+�,'�" �B�K�H�-�R�
M�
?�
?�
(�(�
G�3�7�(�(�(�b�
F�
S�
�.�/�.�
�_�_�V�/�/�*�<�6�8�.�8�.�.� /�\�d�M�"L�,�4�K�
$�$�$�
&�"A�"�8D�&�"�)�$�"�6�$�
%�7�/�,�"	3�4�4rrnc�6`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Q s"Q!s#Q"s$Q#s%Q$s&Q%s'Q&s(Q's)Q(s*Q)s+Q*s,Q+s-Q,s.Q-s/Q.s0Q/s1Q0s2Us3P!)1�	BlobTestsi�c��[OQ2UmUOOQ2QUmUOOQUO12UOOQQ]2UmP!)r7�create table test(b blob)s2this blob data string is exactly fifty bytes long!�insert into test(b) values (?)r�r�)rr	r!rr�blobopen�blobrs&rr?�BlobTests.setUp�s]���.�.��,��������3�4�I��	������8�4�9�9�,�G��G�G�$�$�V�S�!�4��	rc�p�UOO2UOO2P!r,)r�r<r!rs&rrC�BlobTests.tearDown�s���	�	�������
�
�rc�\�UOUO[O2P!r,)�assertIsInstancer�rrrs&r�test_blob_is_a_blob�BlobTests.test_blob_is_a_blob�s�����d�i�i����5rc�N�UOO]
2UOUOO2]
2UOO]
[2UOUOO2]
2UOO]
[
2UOUOO2]2UOOQ[2UOUOO2](2P!�r�i����)r��seekr�tellrr	r
rs&r�test_blob_seek_and_tell�!BlobTests.test_blob_seek_and_tell�s����	�	���r����������)�2�.��	�	���r�8�$���������)�2�.��	�	���r�8�$���������)�2�.��	�	���s�H�%���������)�2�.rc	�$`�QoQo[UU1Qk1[UU1Qk1[UU1Qk1[UU1Qk11oSFD<vqEoROVEUQ59^tt^2ROVEU2PPP2J>	P!)%fhJS9h)zoffset out of blob rangez;'origin' should be os.SEEK_SET, os.SEEK_CUR, or os.SEEK_ENDc�<:�ROOQ2!)rr�r�r�rs�rrg�0BlobTests.test_blob_seek_error.<locals>.<lambda>�s���$�)�)�.�.��*>rc�<:�ROOQ2!r�r�rs�rrgr��s���$�)�)�.�.��*=rc�>:�ROO]
P2!r:r�rs�rrgr��s���4�9�9�>�>�"�b�+Arc�>:�ROO]
]2!r:r�rs�rrgr��s���4�9�9�>�>�"�a�+@r)rr��fn)r�r�r)r�msg_oor�msg_origr'rr�r�sf      r�test_blob_seek_error�BlobTests.test_blob_seek_error�s����,��P����">�?�
��"=�>�
��#A�B�
��#@�A�	
��$�L�C�b����#�2��6�6��&�&�s��4�7�6�$�6�6�6�s�A>	�>B
�B
c�
�Qo[OQ2oUOO][2UO[U29^tt^2UOOUO[2PPP2UO[U29^tt^2UOOUO[2PPP2P!)%fhKc9h)%fhP!9h)zseek offset results in overflow�	_testcapi)
r�
import_moduler�r�rrrl�INT_MAXr	r
)r�msg_ofr�s&  r�test_blob_seek_overflow_error�'BlobTests.test_blob_seek_overflow_error�s���2��!�/�/��<�	��	�	���q�(�#�
�
#�
#�M�6�
:�
:��I�I�N�N�9�,�,�h�7�;�
�
#�
#�M�6�
:�
:��I�I�N�N�9�,�,�h�7�;�
:�;�
:��
:�
:�
:�s$�+C�)+C1�C.	�'C.	�1D	�:D	c�r�UOO2oUOVO2P!r,)r��readrr�r�bufs& r�test_blob_read�BlobTests.test_blob_read�s$���i�i�n�n�������i�i�(rc��UOO[UO2]*2oUO	VO2P!r)r�r�rbrrr�s& r�test_blob_read_oversized�"BlobTests.test_blob_read_oversized�s3���i�i�n�n�S����^�a�/�0������i�i�(rc���]
oUOOU2oUOV OPU2UOUOO	2U2P!r:)r�r�rrr�)rr�r�s&  r�test_blob_read_advance_offset�'BlobTests.test_blob_read_advance_offset�sL�����i�i�n�n�Q�������i�i���m�,���������)�1�-rc��UOO]
2UOUOO]
2UOQ*2P!)r�:r��N)r�r�rr�rrs&r�test_blob_read_at_offset�"BlobTests.test_blob_read_at_offset�s8���	�	���r�����������+�T�Y�Y�u�-=�>rc��UOOQ2UO[O29^tt^2UO
O
2PPP2P!)%fhP!9h)�&update test set b='aaaa' where rowid=1)r!rr[rrCr�r�rs&r� test_blob_read_error_row_changed�*BlobTests.test_blob_read_error_row_changed�sG�������@�A�
�
�
�v�6�6�
7�
7��I�I�N�N��8�
7�
7�
7�s�A)�)A:	�2A:	c���QO]22oUOOU2UOO	Q2O2oUO
U]*U2P!)snew data�select b from test)�ljustr��writer!rrvr�r�new_datarws&  r�test_blob_write�BlobTests.test_blob_writesR���$�$�R�(���	�	����!��g�g�o�o�2�3�<�<�>������Q���*rc�,�QoUOO]2UOOU2UOO	Q2O2oUO
U]*UOQ*U*2P!)�cr�:Nr�Nsccccccccccccccccccccccccc)r�r�rr!rrvrrrs&  r�test_blob_write_at_offset�#BlobTests.test_blob_write_at_offset
sd�����	�	���r���	�	����!��g�g�o�o�2�3�<�<�>������Q�����3��(�!:�;rc��UOOQ2UOUOO2]
2P!)�ds
dddddddddd)r�rrr�rs&r�test_blob_write_advance_offset�(BlobTests.test_blob_write_advance_offsets-���	�	���� ���������)�2�.rc�P�UO[Q29^tt^2UOOQ2PPP2UOO	][
2[
UO2oUOOQU]*
*2UOOQ2UO[Q29^tt^2UOOQ2PPP2P!)%fhK�9h)%fhP!9h)zdata longer than blob�a��aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)rr�r�rr�rrb)rr�s& r�test_blob_write_error_length�&BlobTests.test_blob_write_error_lengths���
�
#�
#�J�0G�
H�
H��I�I�O�O�K�(�I�	
�	�	���q�(�#���	�	�N���	�	�����!���%��	�	�����
�
#�
#�J�0G�
H�
H��I�I�O�O�D�!�I�
H�I�
H��I�
H�
H�s#�D�D�D	�
D	�D%	�D%	c��UOOQ2UO[O29^tt^2UO
O
Q2PPP2P!)%fhP!9h)r��aaa)r!rr[rrCr�rrs&r�!test_blob_write_error_row_changed�+BlobTests.test_blob_write_error_row_changed sI�������@�A�
�
�
�v�6�6�
7�
7��I�I�O�O�F�#�8�
7�
7�
7�rc��UOOQQ]P	Q5oUO[OQ29^tt^2UOQ2PPP2UO
2P!)%fhK"9h)r�r�)�readonlyrr)r!r�rrrCrr<)r�ro_blobs& r�test_blob_write_error_readonly�(BlobTests.test_blob_write_error_readonly%s]���'�'�"�"�6�3��D�"�A��
�
#�
#�F�$;�$;�Z�
H�
H��M�M�&�!�I��
�
��I�
H�s�	A5�5B	�>B	c�t�QQQ-1Q-1Q-1Q-11oQoSFDvvq4UOV4Q59^tt^2UO[OU29^tt^2UOO
U-U@PPP2PPP2Jx	P!)%fhK9h)%fhJ�9h)	r�r��notexistingzno such)ra�kwds)r�r�r )rr�r )r�rr )r�r�r#)r�rrrCr!r�)rr'rrars&    r�test_blob_open_error�BlobTests.test_blob_open_error+s���
��
�6�7�
$�b�)�
'��,�
�r�"�	
����!�J�D����4��3�3��+�+�F�,C�,C�U�K�K��G�G�$�$�d�3�d�3�L�4�3�"�K�K��4�3�3�s/�)B&	�B
�=B&	�B#�B#�B&	�&B7
�/B7
c�R�UO[UO2]22P!)�2)rrbr�rs&r�test_blob_length�BlobTests.test_blob_length8s������T�Y�Y���,rc��UOUO]*[Q22UOUO]*[Q22UOUO]*[Q22UOUO]*[Q22UOUOP*[Q22P!)r2r��l�o�!)rr��ordrs&r�test_blob_get_item�BlobTests.test_blob_get_item;s���������1��s�3�x�0�������1��s�3�x�0�������1��s�3�x�0�������1��s�3�x�0�������2���C��1rc���[Q2UO]$QUOQ**oUOO	Q2O2]*oUO
V!2P!)r��b:r NNr�)r(r�rr!rrvr�rr�r�s&  r�test_blob_set_item�BlobTests.test_blob_set_itemBsT���3�x��	�	�!���$�)�)�B�-�'�������!5�6�?�?�A�!�D������*rc��UOO][2UOUOO	2Q2[Q2UO]$[Q2UOP$UOO][2QoUOUOO	2U2P!)rr�T�.s2This blob data string is exactly fifty bytes long.)r�r�r
rr�r(r)rr�s& r�test_blob_set_item_with_offset�(BlobTests.test_blob_set_item_with_offsetHs����	�	���q�(�#���������)�3�/��3�x��	�	�!���C���	�	�"�
��	�	���q�(�#�H����������)�8�4rc�v�]QHGo[Q2UOQ$UOUOQ*Q2[	Q2UOQ$UOUOQ*Q2UQ,QN2UOQ$UOUOQ*Q2P!)r)�array�12345�rr2Ns23456r�s)r r#r!r�r2)r6r&r�r�	bytearray)rr6s& r�!test_blob_set_slice_buffer_object�+BlobTests.test_blob_set_slice_buffer_objectQs����#�H�-��	�	�#��������3���2�"�8�,��	�	�#��������3���2��s�O�4��	�	�#��������3��)@�Arc�l�]�UOP$UOUOP*]�2P!)�)r�rrs&r�!test_blob_set_item_negative_index�+BlobTests.test_blob_set_item_negative_index\s'����	�	�"�
�������2���,rc�N�UOUOQ*Q2P!):r2�Ns	blob data�rr�rs&r�test_blob_get_slice�BlobTests.test_blob_get_slice`s��������4��,�7rc�N�UOUOQ*Q2P!)�r2r2NrrBrs&r�test_blob_get_empty_slice�#BlobTests.test_blob_get_empty_slicecs��������3���-rc���UOOQQ2UOOQQ]29^tt^2oUOU]QQ2PPP2P!)%fhP!9h)r�r�r�r)sabc���)r!rr�r)rr�s& r�%test_blob_get_empty_slice_oob_indices�/BlobTests.test_blob_get_empty_slice_oob_indicesfsU�������8�)�D�
�W�W�
�
�f�c�1�
-�
-�����T�!�B�Z��-�.�
-�
-�
-�s�A#�#A4	�,A4	c�`�UOUO]QUO]Q2P!)r2rJ)rr�rrs&r�"test_blob_get_slice_negative_index�,BlobTests.test_blob_get_slice_negative_indexks&��������1�R��$�)�)�A�b�/�:rc�N�UOUOQ*Q2P!)�rr�r#sti lbrBrs&r�test_blob_get_slice_with_skip�'BlobTests.test_blob_get_slice_with_skipns��������6�*�H�5rc���QUOQ$QUOQ**oUOOQ2O	2]*oUOV!2P!)r7r8:r2NNr�)r�rr!rrvrr-s&  r�test_blob_set_slice�BlobTests.test_blob_set_sliceqsP��!��	�	�#���d�i�i��m�+�������!5�6�?�?�A�!�D������*rc��QUOQ$UOUOQ*UO2P!)r:rrN�NNN�r�rrrs&r�test_blob_set_empty_slice�#BlobTests.test_blob_set_empty_slicew�+����	�	�#��������1��t�y�y�1rc��UO[29^tt^2PUOQ$PPP2P!)%fhP!9h)NrF)r[r�r�rs&r�$test_blob_set_empty_slice_wrong_type�.BlobTests.test_blob_set_empty_slice_wrong_type{s/��
�
�
�y�
)�
)�!�D�I�I�c�N�*�
)�
)�
)�s�9�A
	�A
	c��UO[Q29^tt^2QUOQ$PPP2P!)%fhP!9h)�
wrong sizes123rF)r�
IndexErrorr�rs&r�$test_blob_set_empty_slice_wrong_size�.BlobTests.test_blob_set_empty_slice_wrong_sizes1��
�
#�
#�J��
=�
=�#�D�I�I�c�N�>�
=�
=�
=�s�:�A	�A	c��QUOQ$UOUOQ*UO2P!)rrFrXrYrs&r�!test_blob_set_empty_slice_correct�+BlobTests.test_blob_set_empty_slice_correct�r\rc���QUOQ$UOOQ2O2]*oQUOQ**oUOV2P!)r7rQr�s
1h2s3b4o5 :r�NN)r�r!rrvrr)rr�r�s&  r�test_blob_set_slice_with_skip�'BlobTests.test_blob_set_slice_with_skip�sQ��$��	�	�&�������!5�6�?�?�A�!�D�� �4�9�9�S�>�1������*rc���QoUO[U29^tt^2UOQ*PPP2UO[U29^tt^2UOQ*PPP2UO[U29^tt^2QUOQ$PPP2P!)%fhK�9h)%fhK[9h)%fhP!9h)zindices must be integers:r2g@Ng�?r,r��rr�r�)rr�s& r�$test_blob_mapping_invalid_index_type�.BlobTests.test_blob_mapping_invalid_index_type�s���(��
�
#�
#�I�s�
3�
3��I�I�e��4�
�
#�
#�I�s�
3�
3��I�I�c�N�4�
�
#�
#�I�s�
3�
3�!�D�I�I�c�N�4�
3�	4�
3��
3�
3��
3�
3�
3�s5�B0�C�C�0C	�9C	�C	�C	�C'	�C'	c�8�[UO2]iQ,oSFD`oUOUQ59^tt^2UO[Q29^tt^2UOU*PPP2PPP2Jb	UO
O
Q2UO[O29^tt^2UO]*PPP2P!)%fhK|9h)%fhJ�9h)%fhP!9h)�i)�idxzindex out of ranger�i����)
rbr�r�rrbr!rr[rrC)rr'rqs&  r�test_blob_get_item_error�"BlobTests.test_blob_get_item_error�s����t�y�y�>�3��-���C����#��&�&��+�+�J�8L�M�M��I�I�c�N�N�'�&��	
�����@�A�
�
�
�v�6�6�
7�
7��I�I�a�L�8�
7�N�M��'�&�&��8�
7�
7�sA�C4	�C!
�-C4	�D�!C1�*C1�,C4	�4D
�=D
�D	�D	c���[OQ2oUO[Q29^tt^2UOUO
*PPP2P!)%fhP!9h)r�zcannot fit 'int')rr�rrbr��
ULLONG_MAX)rr�s& r�test_blob_get_item_error_bigint�)BlobTests.test_blob_get_item_error_bigint�sH��!�/�/��<�	�
�
#�
#�J�0B�
C�
C��I�I�i�*�*�+�D�
C�
C�
C�s�A�A/	�'A/	c��UO[Q29^tt^2QUO]$PPP2UO[Q29^tt^2QUO]$PPP2UO[Q29^tt^2[Q2UO]$PPP2UO[Q29^tt^2UO]PPP2UO[Q29^tt^2]UOQ$PPP2UO[
Q29^tt^2PUO]$PPP2UO[
Q29^tt^2QUO]$PPP2UO[
Q29^tt^2]]A*UO]$PPP2P!)%fhCK�9h)%fhCKy9h)%fhCKN9h)%fhCK.9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)zcannot be interpretedsmultipler��doesn't support.*deletionzBlob index out of rangerrzmust be in range�)rr�r�r9rbr�rs&r�test_blob_set_item_error�"BlobTests.test_blob_set_item_error�s���
�
#�
#�I�/F�
G�
G�&�D�I�I�a�L�H�
�
#�
#�I�/F�
G�
G��D�I�I�a�L�H�
�
#�
#�I�/F�
G�
G�$�T�?�D�I�I�a�L�H�
�
#�
#�I�/J�
K�
K��	�	�!��L�
�
#�
#�J�0I�
J�
J��D�I�I�d�O�K�
�
#�
#�J�0B�
C�
C��D�I�I�a�L�D�
�
#�
#�J�0B�
C�
C��D�I�I�a�L�D��
#�
#�J�0B�
C�
C��b�5�D�I�I�a�L�D�
C�H�
G�
G��
G�
G�
G��
G�
G�
G��
K�
K�
K��
J�
J�
J��
C�
C��
C�
C��D�
C�
C�s��G�G�G*�G>�?H�5H&�+H9�!I�G	�G	�G'	�G'	�*G;	�3G;	�>H	�H	�H#	�H#	�&H6	�/H6	�9I		�I		�I	�I	c��UO[Q29^tt^2QUOQ$PPP2UO[Q29^tt^2Q	UOQ$PPP2UO[Q29^tt^2UOQPPP2UO[Q29^tt^2QUOQ$PPP2UO[29^tt^2[Q2Q*UOQ$PPP2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)
rar:r2r�Nryzstep cannot be zeror7:r2r�rsabcder"r)rrbr�r�r�r[r%r&rs&r�test_blob_set_slice_error�#BlobTests.test_blob_set_slice_error�s���
�
#�
#�J��
=�
=�"�D�I�I�d�O�>�
�
#�
#�J��
=�
=�)�D�I�I�d�O�>�
�
#�
#�I�/J�
K�
K��	�	�$��L�
�
#�
#�J�0E�
F�
F� (�D�I�I�f��G�
�
�
�{�
+�
+�(��2�3�7�D�I�I�d�O�,�
+�>�
=��
=�
=��
K�
K��
F�
F��
+�
+�
+�sY�D�D2�E�E�5 E+�D/	�(D/	�2E	�;E	�E	�E	�E(	�!E(	�+E<	�4E<	c���UO[Q29^tt^2UOUO*PPP2UO[Q29^tt^2UO]*PPP2UO[Q29^tt^2QUO7PPP2P!)%fhK�9h)%fhK[9h)%fhP!9h)zunsupported operandzis not.+iterablerrlrs&r� test_blob_sequence_not_supported�*BlobTests.test_blob_sequence_not_supported�s���
�
#�
#�I�/D�
E�
E��I�I��	�	�!�F�
�
#�
#�I�/D�
E�
E��I�I��M�F�
�
#�
#�I�/A�
B�
B��D�I�I��C�
B�	F�
E��
E�
E��
B�
B�
B�s5�B8�$C�C�8C	�C	�C	�C	�C/	�'C/	c���QoUOOQQ]29^tt^2oUOU2PPP2UOOQ2O	2]*oUOV12UO
[OQ29^tt^2WO2PPP2P!)%fhK�9h)%fhP!9h)rr�r�r�zclosed blobs2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
r!r�rrrvrrrrPr�)rrr�r�s&   r�test_blob_context_manager�#BlobTests.test_blob_context_manager�s�����
�W�W�
�
�f�c�1�
-�
-���J�J�t��.������!5�6�?�?�A�!�D������&��
#�
#�F�$;�$;�]�
K�
K��I�I�K�L�
K�
.�
-��L�
K�
K�s#�C�,C�C	�C	�C+	�#C+	c	��QQ[2oUOUQ29^tt^2UOOQQ]29^tt^2oUQ2g)%fhL9hPPP2P!)%fhP!9h)c��\sQsQsQsP!)�NBlobTests.test_blob_context_manager_reraise_exceptions.<locals>.DummyExceptioni�r*r�r*rr�DummyExceptionr��s��rr��reraisedr�r�)r/rr!r�)rr�r�s&  r�,test_blob_context_manager_reraise_exceptions�6BlobTests.test_blob_context_manager_reraise_exceptions�sc��	�Y�	�
�
#�
#�N�J�
?�
?����!�!�&�#�q�1�1�T�$�Z�0�0�2�1��1�@�
?�
?�
?�s)�&A8�	A	�A*
�#A*
�%A8�8B		�B		c	�b�[29^tt^2oUOQ2UOQ2UOQQ]2oUO2QoUO	[
OU29^tt^2UO2PPP2UO	[
OU29^tt^2UOQ2PPP2UO	[
OU29^tt^2UO]2PPP2UO	[
OU29^tt^2UO2PPP2UO	[
OU29^tt^2UO2PPP2UO	[
OU29^tt^2UOPPP2PPP2UO	[
OU29^tt^2[U2PPP2UO	[
OU29^tt^2U]*PPP2UO	[
OU29^tt^2UQ*PPP2UO	[
OU29^tt^2QU]$PPP2PPP2P!)%fhCKK9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKe9h)%fhCK=9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)r�z'insert into test values (zeroblob(100))r�r�zCannot operate on a closed blobr:rr N)rrr�r<rrrPr�rr�r��	__enter__�__exit__rb)rr!r�r�s&   r�test_blob_closed�BlobTests.test_blob_closed�sR��
�
�
�"��J�J�2�3��J�J�@�A��;�;�v�s�A�.�D��J�J�L�3�C��'�'��(?�(?��E�E��	�	��F��'�'��(?�(?��E�E��
�
�3��F��'�'��(?�(?��E�E��	�	�!��F��'�'��(?�(?��E�E��	�	��F��'�'��(?�(?��E�E���� �F��'�'��(?�(?��E�E��
�
�d�D�$�/�F��'�'��(?�(?��E�E��D�	�F��'�'��(?�(?��E�E��Q��F��'�'��(?�(?��E�E��S�	�F��'�'��(?�(?��E�E���Q��F�3�
�F�E�E��E�E�E��E�E�E��E�E�E��E�E�E��E�E�E��E�E�E��E�E�E��E�E��E�E��3�
�
�s>�A0N�K	�0N�K+	�0N�K?	�0N�	L	�0N�
L'	�0N�L;	�0N�M	�0N�
M#	�0N�
M7	�0N�?N
	�N�K(
� K(
�"	N�+K<
�4K<
�6	N�?L
�L
�
	N�L$
�L$
�	N�'L8
�0L8
�2	N�;M
�M
�	N�M 
�M 
�	N�#M4
�,M4
�.	N�7N
�N
�N�
N
�N
�N�N.	�&N.	c�F�[29^tt^2oUOQ2UOQ2UOQQ]2oUO2UO	[
OQUO2PPP2P!)%fhP!9h)r�z*insert into test(b) values (zeroblob(100))r�r�z#Cannot operate on a closed database)rrr�r<rrrPr�)rr!r�s&  r�test_blob_closed_db_read�"BlobTests.test_blob_closed_db_read�sq��
�
�
�"��J�J�2�3��J�J�C�D��;�;�v�s�A�.�D��H�H�J��"�"�6�#:�#:�#H�#'�9�9�
.��
�
�
�s�A1B�B 	�B 	c���[29^tt^2oQoUOQ2UOQU12UOQQU2PPP2P!)%fhP!9h)r#zcreate table t(t blob)z/insert into t(rowid, t) values (?, zeroblob(1))rcl)rrr�)rr!�rowids&  r�test_blob_32bit_rowid�BlobTests.test_blob_32bit_rowidsO��
�
�
�"��E��J�J�/�0��J�J�H�5�(�S��K�K��S�%�(�	�
�
�
�s�:A�A)	�!A)	)r�r!r)4r+r,r-r.r?rCr�r�r�r�r�r�r�r�r�rrrrrrrr"r)r.r3r:r>rCrGrKrNrRrUrZr^rcrfrirmrrrvr{r~r�r�r�r�r�r�r/r0r1s@rr�r��s�����5��6�/�5�8�)�)�.�?��
+�<�/�	"�$�
�4�-�2�+�5�	B�-�8�.�.�
;�6�+�2�"�$�2�+�"�
�,�
!�&
8��	�1��:.�)�)rr�c�`�\sQsQsnQsQs\OQ2sQs	Qs
\OQ2sQsUs
P!)	�ThreadTestsic���[OQ2UmUOO2UmUOOQ2UOOQ2P!)r7z$create table test(name text, b blob)z,insert into test values('blob', zeroblob(1)))rr	rr;r]rrs&rr?�ThreadTests.setUpsJ���>�>�*�-����8�8�?�?�$��������?�@������G�Hrc�p�UOO2UOO2P!r,�r]r<rrs&rrC�ThreadTests.tearDown��������������rc��```�UUU1Qko,o[OUQU-Q5oUO2UO2U%c#UO	QOU22P!P!)c�:�RR-R@UOQ2P![OcP!SOQ2P!9h)zdid not raise ProgrammingErrorzraised wrong exception)r�rrP)�errrar�rs&���r�run�"ThreadTests._run_test.<locals>.runsG���
5��D�!�D�!��
�
�;�<���*�*�
��
5��
�
�3�4�s� �A
�A
�A
r���targetrb�
)�	threading�Thread�start�join�fail)rr�rarr�r�rcs&fjl   r�	_run_test�ThreadTests._run_testsS���	5������C����=��	���	�	������I�I�d�i�i��n�%�rc�`�U1QkU1QkU1QkU1QkU1QkU1QkU1QkU1QkU1QkU1Q	k,
o[[OQ
2%c+UOU1Qk2UOU1Qk2[OQ6�cUOU1Q
k2SFD7oROUQ59^tt^2RO
U2PPP2J9	P!)%fhJN9h)c�::�ROO2!r,)rr;rs�rrg�:ThreadTests.test_check_connection_thread.<locals>.<lambda>1����D�H�H�O�O�%rc�::�ROO2!r,)rrHrs�rrgr�2r�rc�::�ROO2!r,)rrPrs�rrgr�3����D�H�H�%�%�'rc�::�ROO2!r,)rr<rs�rrgr�4����D�H�H�N�N�$rc�<:�ROOP2!r,)r�set_trace_callbackrs�rrgr�5s���D�H�H�/�/��5rc�<:�ROOP2!r,)r�set_authorizerrs�rrgr�6s���D�H�H�+�+�D�1rc�>:�ROOQP2!r9)r�create_collationrs�rrgr�7s���D�H�H�-�-�e�T�:rc�Z:�ROO[OP2!r�)rr�rr�rs�rrgr�8s���D�H�H�%�%�f�&@�&@�"�Erc�X:�ROO[O2!r,)rr�rr�rs�rrgr�9s���D�H�H�%�%�f�&@�&@�Arc�@:�ROOQQ]2!)r�r�)rr�rs�rrgr�:s���D�H�H�%�%�f�c�1�5rrc�::�ROO2!r,)rrrs�rrgr�=s���t�x�x�1�1�3rc�<:�ROOQ2!)r)rrrs�rrgr�>s���t�x�x�3�3�C�8rc�@:�ROOQ]P2!r9)r�create_window_functionrs�rrgr�@s���t�x�x�>�>�u�a��Nr�r�r�)�hasattrrrr�r�r�r��r�fnsr�sf  r�test_check_connection_thread�(ThreadTests.test_check_connection_thread/s����%�%�'�$�5�1�:�E�A�5�
���6�$�$�k�2�2��J�J�3�4��J�J�8�9��%�%��3��J�J�N�O��B������$�$����r�"�%�$��$�$�$�s�C+	�+C<
�4C<
c	��`�U1QkU1QkU1QkU1Qk,oSFD7oROUQ59^tt^2ROU2PPP2J9	P!)%fhJN9h)c�<:�ROOQ2!)z"insert into test(name) values('a')�r]rrs�rrg�6ThreadTests.test_check_cursor_thread.<locals>.<lambda>Hs���D�H�H�$�$�%I�Jrc�::�ROO2!r,)r]r<rs�rrgr�Ir�rc�<:�ROOQ2!r}r�rs�rrgr�Js���D�H�H�$�$�%<�=rc�::�ROO2!r,)r]rvrs�rrgr�Kr�rr�)r�r�r�sf  r�test_check_cursor_thread�$ThreadTests.test_check_cursor_threadFsQ���J�$�=�'�	
���B������$�$����r�"�%�$��$�$�$�s�A	�A*
�"A*
c	�B�Qo[P
Q59^tt^2o,o[OUQUQU-Q5oUO2UO	2UO[
U2]QO	U22PPP2P!)%fhP!9h)c��UOQ2P![OcSOQ2P!h9h)rzmulti-threading not allowed)rrr3r�)rr�s&&rr��4ThreadTests.test_dont_check_same_thread.<locals>.runTs3��
:����J�'���<�<�
:��
�
�8�9�
:�s��A�A�A)�check_same_threadrr�r�r�)rr�r�r�r�rrb)rr�rr�rcs&    r�test_dont_check_same_thread�'ThreadTests.test_dont_check_same_threadRsu��	:��u�
5�
5���C�� � ��U�C���4L�M�A�
�G�G�I�
�F�F�H����S��X�q�$�)�)�C�.�9�6�
5�
5�
5�s�A*B
�
B	�B	�rr])r+r,r-r.r?rCr�reap_threadsr�r�r�r�r/r0r1s@rr�r�sN����I���"�"�&�#�&�"#�.	#��"�"�:�#�:rr�c�L`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
�ConstructorTestsibc�8�[OQ]
]2oP!�i�)r�Date�rr�s& r�	test_date�ConstructorTests.test_datecs���K�K��b�"�%�rc�8�[O]]']#2oP!)�)r�Time�rrcs& r�	test_time�ConstructorTests.test_timefs���K�K��B��#�rc�>�[OQ]
]]]']#2oP!r�)r�	Timestamp�r�tss& r�test_timestamp�ConstructorTests.test_timestampis��
�
�
�d�B��B��B�
7�rc�4�[O]*2oP!r�)r�
DateFromTicksr�s& r�test_date_from_ticks�%ConstructorTests.test_date_from_ticksl���� � ��$�rc�4�[O]*2oP!r�)r�
TimeFromTicksr�s& r�test_time_from_ticks�%ConstructorTests.test_time_from_ticksor�rc�4�[O]*2oP!r�)r�TimestampFromTicksr�s& r�test_timestamp_from_ticks�*ConstructorTests.test_timestamp_from_ticksrs��
�
&�
&�r�
*�rc�4�[OQ2oP!)s')r�Binary)rr�s& r�test_binary�ConstructorTests.test_binaryus���M�M�&�!�rr*)
r+r,r-r.r�r�r�r�r�r�rr/r0r1s@rr�r�bs-����&�$�8�%�%�+�"�"rr�c�p`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsUsP!)�ExtensionTestsixc�|�[OQ2UmUOO2UmP!r�)rr	rr;r]rs&rr?�ExtensionTests.setUpys$���>�>�*�-����8�8�?�?�$��rc�p�UOO2UOO2P!r,r�rs&rrC�ExtensionTests.tearDown}r�rc��UOoUOQ2UOQ2UO2]*oUO	U]2P!)z�
            -- bla bla
            /* a stupid comment */
            create table a(i);
            insert into a(i) values (5);
            zselect i from a)r]rkrrvr)rr]rns&  r�test_script_string_sql�%ExtensionTests.test_script_string_sql�sM���h�h������	�	���%�&��l�l�n�Q�������a� rc���UO[O29^tt^2UOO	Q2PPP2P!)%fhP!9h)zo
                CREATE TABLE test(x);
                asdf;
                CREATE TABLE test2(x)
            �r[rrCr]rkrs&r�test_script_syntax_error�'ExtensionTests.test_script_syntax_error�s?��
�
�
�v�6�6�
7�
7��H�H�"�"�$�
�8�
7�
7�
7�rc���UO[O29^tt^2UOO	Q2PPP2P!)%fhP!9h)zc
                CREATE TABLE test(sadfsadfdsa);
                SELECT foo FROM hurz;
            rrs&r�test_script_error_normal�'ExtensionTests.test_script_error_normal�s?��
�
�
�v�6�6�
7�
7��H�H�"�"�$�
�8�
7�
7�
7�rc��UO[29^tt^2UOOQ2PPP2P!)%fhP!9h)sg
                CREATE TABLE test(foo);
                INSERT INTO test(foo) VALUES (5);
            )r[r�r]rkrs&r�"test_cursor_executescript_as_bytes�1ExtensionTests.test_cursor_executescript_as_bytes�s9��
�
�
�y�
)�
)��H�H�"�"�$�
�*�
)�
)�
)�r�c��UO[29^tt^2UOOQ2PPP2P!)%fhP!9h)z^
                CREATE TABLE a(i);
                INSERT INTO a(i) VALUES (5);
            )r[r�r]rkrs&r�.test_cursor_executescript_with_null_characters�=ExtensionTests.test_cursor_executescript_with_null_characters�s9��
�
�
�z�
*�
*��H�H�"�"�$�
�+�
*�
*�
*�r�c��UO[29^tt^2UOOQ2PPP2P!)%fhP!9h)ua
                CREATE TABLE a(s);
                INSERT INTO a(s) VALUES ('�');
            )r[�UnicodeEncodeErrorr]rkrs&r�)test_cursor_executescript_with_surrogates�8ExtensionTests.test_cursor_executescript_with_surrogates�s:��
�
�
�1�
2�
2��H�H�"�"�$�
�3�
2�
2�
2�r�c���Qo[29^tt^2o[U29^tt^2oUOQOU22UO	[
OU29^tt^2UOQOU]*22PPP2PPP2PPP2P!)%fhK"9h)%fhK-9h)%fhP!9h)r�zselect 'almost too large'zselect 'too large')rrrkr�rrr?)rr�r!�lims&   r�*test_cursor_executescript_too_large_script�9ExtensionTests.test_cursor_executescript_too_large_script�s���)��
�
�
�"�h�r�l�l�c����8�>�>�s�C�D��'�'��(8�(8�#�>�>�� � �!5�!;�!;�C��E�!B�C�?�'3�
�
�>�>��'3�l��
�
�
�sM�C�A	C	�3(B5
�C	�#C�5C�>C�C	�C
�C
�C�C,	�$C,	c���UOoUOQ2UOUO2UO	Q2UOUO2P!)�beginr)rrr'rurkr%)rrs& r�$test_cursor_executescript_tx_control�3ExtensionTests.test_cursor_executescript_tx_control�sK���h�h�����G������*�*�+����*�%�����+�+�,rc��UOOQ2O2]*oUOU]Q2P!)zselect 5z Basic test of Connection.execute)rrrvr)r�results& r�test_connection_execute�&ExtensionTests.test_connection_execute�s7�����!�!�*�-�6�6�8��;�������$F�Grc�,�UOoUOQ2UOQQQ,2UOQ2O2oUO	U]*]*]Q2UO	U]*]*]Q2P!)zcreate table test(foo)z insert into test(foo) values (?)z!select foo from test order by fooz$Basic test of Connection.executemanyr�r�)rrrjrir�rrr%s&  r�test_connection_executemany�*ExtensionTests.test_connection_executemany�sy���h�h�����,�-����:�T�4�L�I����@�A�J�J�L��������1��q�*P�Q�������1��q�*P�Qrc��UOoUOQ2UOQ2O2]*oUO	U]Q2P!)z[
            CREATE TABLE test(foo);
            INSERT INTO test(foo) VALUES (5);
        zselect foo from testz&Basic test of Connection.executescript)rrkrrvrr*s&  r�test_connection_executescript�,ExtensionTests.test_connection_executescript�sP���h�h������	
����3�4�=�=�?��B�������$L�Mrr�)r+r,r-r.r?rCr	r
rrrrrr"r&r+r.r/r0r1s@rrrxsP����%��
!������D�-�H�R�N�Nrrc�d`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sUsP!)�ClosedConTestsi�c��QoUO[OU29^tt^2UU-U@PPP2P!)%fhP!9h)z$Cannot operate on a closed database.)rrrP)rr�rarrs&&*, r�check�ClosedConTests.check�s=��6��
�
#�
#�F�$;�$;�U�
C�
C������D�
C�
C�
C�s�
A�A	�	A	c��[OQ2UmUOO2UmUOO2P!r�)rr	rr;r]r<rs&rr?�ClosedConTests.setUp�s2���>�>�*�-����8�8�?�?�$��������rc�R�UOUOO2P!r,)r3rr;rs&r�test_closed_con_cursor�%ClosedConTests.test_closed_con_cursor�����
�
�4�8�8�?�?�#rc�R�UOUOO2P!r,)r3rrHrs&r�test_closed_con_commit�%ClosedConTests.test_closed_con_commit�r:rc�R�UOUOO2P!r,)r3rrPrs&r�test_closed_con_rollback�'ClosedConTests.test_closed_con_rollback�s���
�
�4�8�8�$�$�%rc�T�UOUOOQ2P!)zselect 4)r3r]rrs&r�test_closed_cur_execute�&ClosedConTests.test_closed_cur_execute�s���
�
�4�8�8�#�#�Z�0rc�^�QoUOUOOQ]U2P!)c��]!�r�r*res&rr��5ClosedConTests.test_closed_create_function.<locals>.f�s��rr:)r3rrl)rr�s& r�test_closed_create_function�*ClosedConTests.test_closed_create_function�s#��	��
�
�4�8�8�+�+�U�A�q�9rc�l�QQ2oUOUOOQ]U2P!)c�4`�\sQsQsnQsQsQsQsUsP!)�8ClosedConTests.test_closed_create_aggregate.<locals>.Aggi�c��P!r,r*rs&rr��AClosedConTests.test_closed_create_aggregate.<locals>.Agg.__init__����rc��P!r,r*r�s&&r�step�=ClosedConTests.test_closed_create_aggregate.<locals>.Agg.step�rOrc��]!rFr*rs&r�finalize�AClosedConTests.test_closed_create_aggregate.<locals>.Agg.finalize�s��rr*)	r+r,r-r.r�rQrTr/r0r1s@r�AggrL�s����
�
�
�
rrVr:)r3r�create_aggregate)rrVs& r�test_closed_create_aggregate�+ClosedConTests.test_closed_create_aggregate�s*��	�	�	
�
�
�4�8�8�,�,�e�Q��<rc�Z�QoUOUOOU2P!)c�$�[O!r,)r�DENY)ras*r�
authorizer�=ClosedConTests.test_closed_set_authorizer.<locals>.authorizer�s���;�;�r)r3rr�)rr]s& r�test_closed_set_authorizer�)ClosedConTests.test_closed_set_authorizer�s��	��
�
�4�8�8�*�*�J�7rc�\�QoUOUOOU]d2P!)c��P!r,r*r*rr�progress�BClosedConTests.test_closed_set_progress_callback.<locals>.progresss��r)r3r�set_progress_handler)rrcs& r�!test_closed_set_progress_callback�0ClosedConTests.test_closed_set_progress_callbacks!��	��
�
�4�8�8�0�0�(�C�@rc�>�UOUO2P!r,)r3rrs&r�test_closed_call�ClosedConTests.test_closed_calls���
�
�4�8�8�rr�)r+r,r-r.r3r?r8r<r?rBrHrXr_rfrir/r0r1s@rr1r1�sB�����
�
$�$�&�1�:�
=�8�
A�
�rr1c�(`�\sQsQsnQsQsUsP!)�ClosedCurTestsi	c	�P�UOO2oUO2QFD_oUQ7cQoLUQ6XcQQQ,1oL,oUO[O
29^tt^2[
V2oUUPPP2Ja	P!)%fhJv9h)rrjzinsert into foo(bar) values (?))rrjrkrir�rv)rrk)zselect 4 union select 5rr))r!r;r<r[rrPr�)rr]�method_namer��methods&    r�test_closed�ClosedCurTests.test_closed
s����g�g�n�n����	�	��k�K��:�:�5���
�-�;�d�D�\�J�����"�"�6�#:�#:�;�;� ��2�����<�;�l�<�;�;�s�3B	�B%
�B%
r*)r+r,r-r.rpr/r0r1s@rrlrl	s���� � rrlc�X`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
UsP!)�SqliteOnConflictTestsic��[OQ2UmUOO2UmUOOQ2P!)r7zz
          CREATE TABLE test(
            id INTEGER PRIMARY KEY, name TEXT, unique_name TEXT UNIQUE
          );
        rqrs&rr?�SqliteOnConflictTests.setUp"s9���.�.��,����'�'�.�.�"���������	
rc�p�UOO2UOO2P!r,rtrs&rrC�SqliteOnConflictTests.tearDown+rvrc��PUOmUOO2UmUOO	Q2UOO	Q2UOO	Q2UO[O29^tt^2UOO	Q2PPP2UOO2UOO	Q2UOUOO2,2P!)%fhKq9h)N�BEGIN�,INSERT INTO test(name) VALUES ('abort_test')�8INSERT OR ROLLBACK INTO test(unique_name) VALUES ('foo')z"SELECT name, unique_name from test�r!r�r;r>rr[rrHrHrrirs&r�3test_on_conflict_rollback_with_explicit_transaction�ISqliteOnConflictTests.test_on_conflict_rollback_with_explicit_transaction/s���"&������'�'�.�.�"��������� ������F�G������R�S�
�
�
�v�4�4�
5�
5��G�G�O�O�V�W�6�	
�����������<�=�������)�)�+�R�0�
6�
5�s�*D/�/D?	�8D?	c��PUOmUOO2UmUOO	Q2UOO	Q2UOO	Q2UO[O29^tt^2UOO	Q2PPP2UOO2UOO	Q2UOUOO2QQ,2P!)%fhKs9h)Nryrz�5INSERT OR ABORT INTO test(unique_name) VALUES ('foo')�"SELECT name, unique_name FROM test��
abort_testN�Nr:r|rs&r�8test_on_conflict_abort_raises_with_explicit_transactions�NSqliteOnConflictTests.test_on_conflict_abort_raises_with_explicit_transactions>s���#'������'�'�.�.�"��������� ������F�G������O�P�
�
�
�v�4�4�
5�
5��G�G�O�O�S�T�6������������<�=�������)�)�+�.B�N�-S�T�6�
5�s�*D1�1E	�:E	c��UOOQ2UOOQ2UO[O29^tt^2UOOQ2PPP2UOOQ2UOUOO
2,2P!)%fhKW9h)rzr{r��r>rr[rrHrrirs&r�-test_on_conflict_rollback_without_transaction�CSqliteOnConflictTests.test_on_conflict_rollback_without_transactionNs��������F�G������R�S�
�
�
�v�4�4�
5�
5��G�G�O�O�V�W�6������<�=�������)�)�+�R�0�	6�
5�s�C
�
C	�C	c��UOOQ2UOOQ2UO[O29^tt^2UOOQ2PPP2UOOQ2UOUOO
2QQ,2P!)%fhKY9h)rzr�r�r�r�r�rs&r�2test_on_conflict_abort_raises_without_transactions�HSqliteOnConflictTests.test_on_conflict_abort_raises_without_transactionsXs���	
�����F�G������O�P�
�
�
�v�4�4�
5�
5��G�G�O�O�S�T�6�	
�����<�=�������)�)�+�.B�N�-S�T�	6�
5�s�C�C	�C	c�N�UOOQ2UO[O29^tt^2UOOQ2PPP2UOUOO
2,2P!)%fhK<9h)z4INSERT OR FAIL INTO test(unique_name) VALUES ('foo')r�rs&r�test_on_conflict_fail�+SqliteOnConflictTests.test_on_conflict_failcsf�������N�O�
�
�
�v�4�4�
5�
5��G�G�O�O�R�S�6�������)�)�+�R�0�6�
5�s�B�B$	�B$	c��UOOQ2UOOQ2UOOQ2UOUOO2Q,2P!)z6INSERT OR IGNORE INTO test(unique_name) VALUES ('foo')zSELECT unique_name FROM testr9�r>rrrirs&r�test_on_conflict_ignore�-SqliteOnConflictTests.test_on_conflict_ignoreisT�������P�Q������P�Q������6�7�������)�)�+�h�Z�8rc��UOOQ2UOOQ2UOOQ2UOUOO2Q,2P!)zFINSERT OR REPLACE INTO test(name, unique_name) VALUES ('Data!', 'foo')zUINSERT OR REPLACE INTO test(name, unique_name) VALUES ('Very different data!', 'foo')r�)zVery different data!r:r�rs&r�test_on_conflict_replace�.SqliteOnConflictTests.test_on_conflict_replacepsV�������`�a������o�p������<�=�������)�)�+�.M�-N�Orr�)r+r,r-r.r?rCr}r�r�r�r�r�r�r/r0r1s@rrsrss;����
��
1�U� 1�	U�1�9�P�Prrsc�2`�\sQsQsn]sQsQsQsUsP!)�MultiprocessTestsixc�&�[[2P!r,)r
rrs&rrC�MultiprocessTests.tearDown|s	���v�rc�F�Q[QUOQ0o[O[O
QU,Q][O[OQ5oUOUO2UOQUOO2O22[O[UOQ5oU9^tt^2UOQ2PPP2UO O#Q	2UO)2UO+UO,2UOQ
[.Q5UOUO,]2P!)%fhK�9h[O$c/oSO O#['S22Po=K�Po=hh9hSO)2h9h[O0c#SO32SO2gh9h)z�if 1:
            import sqlite3
            def wait():
                print("started")
                assert "database is locked" in input()

            cx = sqlite3.connect("z", timeout=a�)
            cx.create_function("wait", 0, wait)
            with cx:
                cx.execute("create table t(t)")
            try:
                # execute two transactions; both will try to lock the db
                cx.executescript('''
                    -- start a transaction and wait for parent
                    begin transaction;
                    select * from t;
                    select wait();
                    rollback;

                    -- start a new transaction; would fail if parent holds lock
                    begin transaction;
                    select * from t;
                    rollback;
                ''')
            finally:
                cx.close()
        z-czutf-8)�encoding�bufsize�stdin�stdout�started)�timeoutzinsert into t values('test')zno error�end)�inputr�)r�CONNECTION_TIMEOUT�
subprocess�Popenr�
executable�PIPEr3�communicaterr��readline�striprr	rr�rrCr�r<r��
returncoder�TimeoutExpired�kill)r�SCRIPT�procr!rs&    r�&test_ctx_mgr_rollback_if_commit_failed�8MultiprocessTests.test_ctx_mgr_rollback_if_commit_faileds���#�$*�(�+�d�6M�6M�5N�O	�
��:���
�^�^�T�6�*����/�/��?�?�
��	
����(�(�)�	
����D�K�K�$8�$8�$:�$@�$@�$B�C�
�^�^�F�D�,C�,C�
D��	����
�
�9�:��

�J�J���Z�(��H�H�J�	
���$�/�/�*�	����5�-��@�
	
������!�,�#����&�&�	'��J�J���S��X�&�&��	'��

�H�H�J���(�(�	��I�I�K������	�sf�
F�%E;�7F�?G�G)�;F	�F	�F�G�"G�#$G�G�G�G�G&�)H �=#H r*)	r+r,r-r.r�rCr�r/r0r1s@rr�r�xs�������>-�>-rr�c�R`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sUs
P!)�RowTestsi�c�|�[OQ2Um[OUOmP!r�)rr	r!r�r�rs&rr?�RowTests.setUp�s"���.�.��,���$�j�j����rc�<�UOO2P!r,rBrs&rrC�RowTests.tearDown�rErc��UOOQ2oUO2oUOUO	2QQ,2P!)zSELECT 1 as first, 2 as second�first�second)r!rrvr�keys�rr>rws&  r�
test_row_keys�RowTests.test_row_keys�s;��
�W�W�_�_�=�
>���k�k�m���������g�x�%8�9rc��UOOQ2oUO2oUO[	U2]2P!)zSELECT 1, 2, 3)r!rrvrrbr�s&  r�test_row_length�RowTests.test_row_length�s4��
�W�W�_�_�-�
.���k�k�m������S��1�%rc�*�UOOQ2oUO2oUOU]*]2UOU]*]2UOUQ*]2UOUQ*]2QFDToUO	UQ59^tt^2UO[29^tt^2V#*PPP2PPP2JV	P!)%fhK9h)%fhJ~9h)zSELECT 1 as a, 2 as br�r�)r�)�nokeyr�g333333�?)r!rrvrr�r[rb)rr>rwr�s&   r�test_row_getitem�RowTests.test_row_getitem�s���
�W�W�_�_�4�
5���k�k�m������Q���#�����Q���#�����S��1�%�����S��1�%�"�C����#��&�&��&�&�z�2�2��H�3�'�&�#�2�2��'�&�&�s0�1D	�	C.
�D	�.C>�7C>�9D	�D
�
D
c�p�UOOQ2oUO2oUOOQ2oUO2oUOV$2UO	V$2UOOQ2oUO2oUOV&2P!)z
SELECT 1 as az
SELECT 1 as b)r!rrv�assertIsNotr�assertNotEqual)r�c1�r1�c2�r2�c3�r3s&      r�test_row_equality�RowTests.test_row_equality�s���
�W�W�_�_�_�
-��
�[�[�]��
�W�W�_�_�_�
-��
�[�[�]������ ����� �
�W�W�_�_�_�
-��
�[�[�]�����B�#rc�h�UOO2oUOUO2[O
UQ2oUO
UO2,2UO[Q29^tt^2UQ*PPP2P!)%fhP!9h)r�r*)
r!r;r�r�rr�rr�rrbr�s&  r�test_row_no_description� RowTests.test_row_no_description�ss��
�W�W�^�^�
�����"�.�.�)��j�j��R� ���������R�(�
�
#�
#�J��
8�
8���L�9�
8�
8�
8�s�
B � B1	�)B1	c���]QHGoUOOQ2oUO	2oUO[OU2UOV12P!)r)�SequencezSELECT 1)	�collections.abcr�r!rrvr-rr�r�)rr�r>rws&   r�test_row_is_a_sequence�RowTests.test_row_is_a_sequence�sD��,�
�W�W�_�_�Z�
(���k�k�m�����f�j�j�(�3����c�,rr)r+r,r-r.r?rCr�r�r�r�r�r�r/r0r1s@rr�r��s2����)��:�
&�

�
$��-�-rr��__main__)6r6rir1�sqlite3rr�rr�rk�urllib.parserOr��test.supportrrrrrrrr	r
�test.support.os_helperrrr
rr�utilrrr�TestCaserr4r�
skipUnlessr�rrr.rnr��requires_working_threadingr�r�rr1rlrsr�r�r+�mainr*rr�<module>r�s���.��	���
�������$�8�+�+�Y�Y�+�%�I�(�#�#�I�DF/�h�'�'�F/�R-�8�#4�#4�-�(
���W�V�.�.��<�1�3�%3�X�&�&�%3�3�%3�Pa:��!�!�a:�H[4�(�#�#�[4�|U)��!�!�U)�p
�,�,�.�M:�(�#�#�M:�/�M:�`"�x�(�(�"�,ZN�X�&�&�ZN�z1�X�&�&�1�h �(�(�*;�*;� �$ZP�H�-�-�ZP�z��D-��)�)�D-��D-�N>-�x� � �>-�B�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit