#NEWLINE# @ testing . requires . psycopg2_compatibility #NEWLINE# def test_psycopg2_non_standard_err( self ) : #NEWLINE# #INDENT# psycopg2 = testing . db . dialect . dbapi #NEWLINE# TransactionRollbackError = __import__ ( ( '%s.extensions' % psycopg2 . __name__ ) ) . extensions . TransactionRollbackError #NEWLINE# exception = exc . DBAPIError . instance ( 'some statement' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , TransactionRollbackError ( 'foo' ) , psycopg2 . Error ) #NEWLINE# assert isinstance ( TransactionRollbackError , exc . OperationalError )