diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-09 18:11:40 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-09 18:11:40 -0500 |
commit | 7e8f35109725ed3fd3caf96acf8b94a13c53fdfe (patch) | |
tree | 6ee96b736322eff04bb1ec5ff2b6e9de84e5545c /test/dialect/test_mysql.py | |
parent | e80eac22a8669ada5ffaabbcfa8a991eee140697 (diff) | |
download | sqlalchemy-7e8f35109725ed3fd3caf96acf8b94a13c53fdfe.tar.gz |
- Non-DBAPI errors which occur in the scope of an `execute()`
call are now wrapped in sqlalchemy.exc.StatementError,
and the text of the SQL statement and repr() of params
is included. This makes it easier to identify statement
executions which fail before the DBAPI becomes
involved. [ticket:2015]
Diffstat (limited to 'test/dialect/test_mysql.py')
-rw-r--r-- | test/dialect/test_mysql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dialect/test_mysql.py b/test/dialect/test_mysql.py index 183f227c3..fd7a15e5b 100644 --- a/test/dialect/test_mysql.py +++ b/test/dialect/test_mysql.py @@ -621,10 +621,10 @@ class TypesTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL): enum_table.drop(checkfirst=True) enum_table.create() - assert_raises(exc.SQLError, enum_table.insert().execute, + assert_raises(exc.DBAPIError, enum_table.insert().execute, e1=None, e2=None, e3=None, e4=None) - assert_raises(exc.InvalidRequestError, enum_table.insert().execute, + assert_raises(exc.StatementError, enum_table.insert().execute, e1='c', e2='c', e2generic='c', e3='c', e4='c', e5='c', e5generic='c', e6='c') |