#NEWLINE# def test_autocommit( self ) : #NEWLINE# #INDENT# con = con . connections [ 0 ] #NEWLINE# self . assertFalse ( con . get_autocommit ( ) ) #NEWLINE# cur = con . cursor ( ) #NEWLINE# cur . execute ( 'SET AUTOCOMMIT=1' ) #NEWLINE# self . assertTrue ( con . get_autocommit ( ) ) #NEWLINE# con . autocommit ( False ) #NEWLINE# self . assertFalse ( con . get_autocommit ( ) ) #NEWLINE# cur . execute ( 'SELECT @@AUTOCOMMIT' ) #NEWLINE# self . assertEqual ( cur . fetchone ( ) [ 0 ] , 0 )