)kp R d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dlmZ d dlm Z d d lm Z d dl mZ d dl mZ d d l m Z d dl mZ d dl mZ d dlmZ G d dej Z G d dej Z G d dej Z G d dej ZdS ) ) assert_raises)config)eq_)fixtures)ne_)provide_metadata)requirements)Column)Table )exc)Integer)literal_column)select)String)compatc V e Zd ZdZdZdZed Zej d Z d ZdS ) ExceptionTestzTest 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. eachTc t d|t dt dd t dt d d S )N manual_pkidTFprimary_key autoincrementdata2 r r r r clsmetadatas y/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/sqlalchemy/testing/suite/test_dialect.py define_tableszExceptionTest.define_tables sK 4d%HHH66"::&& c t j 5 }| }| | j j ddd t t j |j | j j ddd | d d d d S # 1 swxY w Y d S )N d1r r )r dbconnectbeginexecutetablesr insertr r IntegrityErrorrollback)selfconntranss r" test_integrity_errorz"ExceptionTest.test_integrity_error) s Y DJJLLELL%,,..q$0G0G "%,,..$'' NN s BC CCc t j 5 } | t t d g J # t j $ r>}t | }t |j t | v sJ Y d }~nd }~ww xY wt j rt |t sJ nt |t sJ d d d d S # 1 swxY w Y d S )Nu méil) r r) r* r, r r r DBAPIErrorstrorigr py2k isinstance)r1 r2 errerr_strs r" test_exception_with_non_asciiz+ExceptionTest.test_exception_with_non_ascii<