File: //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_dialect.pyc
�
��4]c @ s/ d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d
l m
Z
d d l m Z d d l m Z d d
l m
Z
d d l m Z d d l m Z d e j f d � � YZ d e j f d � � YZ d e j f d � � YZ d S( i ( t
assert_raises( t config( t eq_( t fixtures( t provide_metadata( t requirements( t Column( t Tablei ( t exc( t Integer( t literal_column( t select( t String( t compatt
ExceptionTestc B sD e Z d Z d Z e Z e d � � Z e j d � � Z
d � Z RS( s� Test basic exception wrapping.
DBAPIs vary a lot in exception behavior so to actually anticipate
specific exceptions from real round trips, we need to be conservative.
t eachc
C s; t d | t d t d t d t �t d t d � � � d S( Nt manual_pkt idt primary_keyt
autoincrementt datai2 ( R R R t Truet FalseR ( t clst metadata( ( sX /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_dialect.pyt
define_tables s
c C s� t j j � �z } | j � } | j | j j j � i d d 6d d 6� t t j
| j | j j j � i d d 6d d 6� | j � Wd QXd S( Ni R t d1R ( R t dbt connectt begint executet tablesR t insertR R t IntegrityErrort rollback( t selft connt trans( ( sX /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_dialect.pyt test_integrity_error( s $c C s� t j j � �� } y, | j t t d � g � � t s= t � WnC t j k
r� } t
| � } t
| j � t
| � k s� t � n Xt j
r� t | t
� s� t � n t | t
� s� t � Wd QXd S( Nu méil( R R R R R R
R t AssertionErrorR t
DBAPIErrort strt origR
t py2kt
isinstance( R# R$ t errt err_str( ( sX /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing/suite/test_dialect.pyt test_exception_with_non_ascii; s % ( t __name__t
__module__t __doc__t run_deletesR t __backend__t classmethodR R t$ duplicate_key_raises_integrity_errorR&