From 7e8f35109725ed3fd3caf96acf8b94a13c53fdfe Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 9 Feb 2011 18:11:40 -0500 Subject: - 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] --- test/dialect/test_sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/dialect/test_sqlite.py') diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py index b99f58bd2..efd616c3d 100644 --- a/test/dialect/test_sqlite.py +++ b/test/dialect/test_sqlite.py @@ -43,7 +43,7 @@ class TestTypes(TestBase, AssertsExecutionResults): meta.drop_all() def test_string_dates_raise(self): - assert_raises(TypeError, testing.db.execute, + assert_raises(exc.StatementError, testing.db.execute, select([1]).where(bindparam('date', type_=Date)), date=str(datetime.date(2007, 10, 30))) -- cgit v1.2.1