403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/sqlite3/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/sqlite3/test/__pycache__/transactions.cpython-36.pyc
3

x2_��@sxddlZddlZddlZdd�ZGdd�dej�ZGdd�dej�ZGdd	�d	ej�Zd
d�Z	dd
�Z
edkrte
�dS)�NcCsdS)NZ
sqlite_testdb�rrr�>/opt/alt/python36/lib64/python3.6/sqlite3/test/transactions.py�get_db_pathsrc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
eje
jdkd�dd��Zeje
jdkd�dd��Zdd�ZdS)�TransactionTestscCsfytjt��Wntk
r$YnXtjt�dd�|_|jj�|_tjt�dd�|_	|j	j�|_
dS)Ng�������?)Ztimeout)�os�remover�OSError�sqlite�connect�con1�cursor�cur1�con2�cur2)�selfrrr�setUpszTransactionTests.setUpcCsR|jj�|jj�|jj�|jj�ytjt��Wntk
rLYnXdS)N)	r
�closerrrr�unlinkrr)rrrr�tearDown+s



zTransactionTests.tearDowncCsN|jjd�|jjd�|jjd�|jjd�|jj�}|jt|�d�dS)Nzcreate table test(i)zinsert into test(i) values (5)zcreate table test2(j)zselect i from testr)r
�executer�fetchall�assertEqual�len)r�resrrr�CheckDMLDoesNotAutoCommitBefore7s
z0TransactionTests.CheckDMLDoesNotAutoCommitBeforecCsB|jjd�|jjd�|jjd�|jj�}|jt|�d�dS)Nzcreate table test(i)zinsert into test(i) values (5)zselect i from testr)r
rrrrr)rrrrr�CheckInsertStartsTransaction?s

z-TransactionTests.CheckInsertStartsTransactioncCsX|jjd�|jjd�|jj�|jjd�|jjd�|jj�d}|j|d�dS)Nzcreate table test(i)zinsert into test(i) values (5)zupdate test set i=6zselect i from testr�)r
rr�commitrZfetchoner)rrrrr�CheckUpdateStartsTransactionFs
z-TransactionTests.CheckUpdateStartsTransactioncCsX|jjd�|jjd�|jj�|jjd�|jjd�|jj�}|jt|�d�dS)Nzcreate table test(i)zinsert into test(i) values (5)zdelete from testzselect i from test�)r
rrrrrrr)rrrrr�CheckDeleteStartsTransactionOs

z-TransactionTests.CheckDeleteStartsTransactioncCsl|jjd�|jjd�|jj�|jjd�|jjd�|jj�}|jt|�d�|j|ddd�dS)Nzcreate table test(i)zinsert into test(i) values (5)zreplace into test(i) values (6)zselect i from testrrr)r
rrrrrrr)rrrrr�CheckReplaceStartsTransactionXs

z.TransactionTests.CheckReplaceStartsTransactioncCs�|jjd�|jjd�d|j_|j|jjd�|jjd�|jj�}|jt|�d�d|j_|j|jjd�|jjd�|jjd�|jj�}|jt|�d�dS)Nzcreate table test(i)zinsert into test(i) values (5)zselect i from testrZDEFERRED)r
rrZisolation_levelrrrr)rrrrr�CheckToggleAutoCommitbs

z&TransactionTests.CheckToggleAutoCommit��z.test hangs on sqlite versions older than 3.2.2c	Cs@|jjd�|jjd�|jtj��|jjd�WdQRXdS)Nzcreate table test(i)zinsert into test(i) values (5))r
r�assertRaisesr	�OperationalErrorr)rrrr�CheckRaiseTimeoutrsz"TransactionTests.CheckRaiseTimeoutc	CsJ|jjd�|jjd�|jtj��|jjd�WdQRX|jj�dS)z�
        This tests the improved concurrency with pysqlite 2.3.4. You needed
        to roll back con2 before you could commit con1.
        zcreate table test(i)zinsert into test(i) values (5)N)r
rr%r	r&rrr)rrrr�CheckLockingzs
zTransactionTests.CheckLockingc	Cs\tjd�}|j�}|jd�|jd�|jd�|j�|jtj��|j�WdQRXdS)z�
        Checks if cursors on the connection are set into a "reset" state
        when a rollback is done on the connection.
        z:memory:zcreate table test(x)zinsert into test(x) values (5)z&select 1 union select 2 union select 3N)r	r
rr�rollbackr%ZInterfaceErrorr)r�con�currrr�CheckRollbackCursorConsistency�s



z/TransactionTests.CheckRollbackCursorConsistencyN)r#r$r$)r#r$r$)�__name__�
__module__�__qualname__rrrrrr r!r"�unittestZskipIfr	Zsqlite_version_infor'r(r,rrrrrs		

rc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�SpecialCommandTestscCstjd�|_|jj�|_dS)Nz:memory:)r	r
r*rr+)rrrrr�szSpecialCommandTests.setUpcCs(|jjd�|jjd�|jjd�dS)Nzcreate table test(i)zinsert into test(i) values (5)zdrop table test)r+r)rrrr�CheckDropTable�sz"SpecialCommandTests.CheckDropTablecCs(|jjd�|jjd�|jjd�dS)Nzcreate table test(i)zinsert into test(i) values (5)zpragma count_changes=1)r+r)rrrr�CheckPragma�szSpecialCommandTests.CheckPragmacCs|jj�|jj�dS)N)r+rr*)rrrrr�s
zSpecialCommandTests.tearDownN)r-r.r/rr2r3rrrrrr1�sr1c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�TransactionalDDLcCstjd�|_dS)Nz:memory:)r	r
r*)rrrrr�szTransactionalDDL.setUpcCs6|jjd�|jj�|jjd�j�}|j|g�dS)Nzcreate table test(i)zselect * from test)r*rr)rr)r�resultrrr�#CheckDdlDoesNotAutostartTransaction�s
z4TransactionalDDL.CheckDdlDoesNotAutostartTransactionc	CsJ|jjd�|jjd�|jj�|jtj��|jjd�WdQRXdS)Nzbegin immediatezcreate table test(i)zselect * from test)r*rr)r%r	r&)rrrr�CheckImmediateTransactionalDDL�s

z/TransactionalDDL.CheckImmediateTransactionalDDLc	CsJ|jjd�|jjd�|jj�|jtj��|jjd�WdQRXdS)NZbeginzcreate table test(i)zselect * from test)r*rr)r%r	r&)rrrr�CheckTransactionalDDL�s

z&TransactionalDDL.CheckTransactionalDDLcCs|jj�dS)N)r*r)rrrrr�szTransactionalDDL.tearDownN)r-r.r/rr6r7r8rrrrrr4�s
		r4cCs4tjtd�}tjtd�}tjtd�}tj|||f�S)NZCheck)r0Z	makeSuiterr1r4Z	TestSuite)Z
default_suiteZspecial_command_suiteZ	ddl_suiterrr�suite�sr9cCstj�}|jt��dS)N)r0ZTextTestRunnerZrunr9)Zrunnerrrr�test�sr:�__main__)rr0Zsqlite3r	rZTestCaserr1r4r9r:r-rrrr�<module>sy!

Youez - 2016 - github.com/yon3zu
LinuXploit