%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/sqlite3/test/ |
Current File : //usr/local/lib/python2.7/sqlite3/test/transactions.pyc |
ó Oêáac @ s— d d l Z d d l Z d d l Z d d l Z d „ Z d e j f d „ ƒ YZ d e j f d „ ƒ YZ d „ Z d „ Z e d k r“ e ƒ n d S( iÿÿÿÿNc C s d S( Nt sqlite_testdb( ( ( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt get_db_path s t TransactionTestsc B sk e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s† y t j t ƒ ƒ Wn t k r' n Xt j t ƒ d d ƒ| _ | j j ƒ | _ t j t ƒ d d ƒ| _ | j j ƒ | _ d S( Nt timeoutgš™™™™™¹?( t ost removeR t OSErrort sqlitet connectt con1t cursort cur1t con2t cur2( t self( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt setUp s c C s` | j j ƒ | j j ƒ | j j ƒ | j j ƒ y t j t ƒ ƒ Wn t k r[ n Xd S( N( R t closeR R R R t unlinkR R ( R ( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt tearDown, s c C si | j j d ƒ | j j d ƒ | j j d ƒ | j j d ƒ | j j ƒ } | j t | ƒ d ƒ d S( Ns create table test(i)s insert into test(i) values (5)s create table test2(j)s select i from testi ( R t executeR t fetchallt assertEqualt len( R t res( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt CheckDMLdoesAutoCommitBefore8 s c C sY | j j d ƒ | j j d ƒ | j j d ƒ | j j ƒ } | j t | ƒ d ƒ d S( Ns create table test(i)s insert into test(i) values (5)s select i from testi ( R R R R R R ( R R ( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt CheckInsertStartsTransaction@ s c C st | j j d ƒ | j j d ƒ | j j ƒ | j j d ƒ | j j d ƒ | j j ƒ d } | j | d ƒ d S( Ns create table test(i)s insert into test(i) values (5)s update test set i=6s select i from testi i ( R R R t commitR t fetchoneR ( R R ( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt CheckUpdateStartsTransactionG s c C sv | j j d ƒ | j j d ƒ | j j ƒ | j j d ƒ | j j d ƒ | j j ƒ } | j t | ƒ d ƒ d S( Ns create table test(i)s insert into test(i) values (5)s delete from tests select i from testi ( R R R R R R R R ( R R ( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt CheckDeleteStartsTransactionP s c C sŽ | j j d ƒ | j j d ƒ | j j ƒ | j j d ƒ | j j d ƒ | j j ƒ } | j t | ƒ d ƒ | j | d d d ƒ d S( Ns create table test(i)s insert into test(i) values (5)s replace into test(i) values (6)s select i from testi i i ( R R R R R R R R ( R R ( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt CheckReplaceStartsTransactionY s c C sâ | j j d ƒ | j j d ƒ d | j _ | j | j j d ƒ | j j d ƒ | j j ƒ } | j t | ƒ d ƒ d | j _ | j | j j d ƒ | j j d ƒ | j j d ƒ | j j ƒ } | j t | ƒ d ƒ d S( Ns create table test(i)s insert into test(i) values (5)s select i from testi t DEFERRED( R R t NoneR t isolation_levelR R R R ( R R ( ( s5 /usr/local/lib/python2.7/sqlite3/test/transactions.pyt CheckToggleAutoCommitc s c C s‚ t j d k r d S| j j d ƒ | j j d ƒ y! | j j d ƒ | j d ƒ Wn' t j k rj n | j d ƒ n Xd S( Ni i s create table test(i)s insert into test(i) values (5)s&