summaryrefslogtreecommitdiff
path: root/test/engine/test_execute.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-10-17 19:37:45 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-10-17 19:37:45 -0400
commit6f40eb37cbdcdae032d73c3537df1e01d2e9e67c (patch)
tree663eddd7294ff70818d3d789d411616f5924754c /test/engine/test_execute.py
parent2924f8685c1d9f25820aa154691afe2d2de645f4 (diff)
downloadsqlalchemy-6f40eb37cbdcdae032d73c3537df1e01d2e9e67c.tar.gz
- Exception messages have been spiffed up a bit. The SQL statement
and parameters are not displayed if None, reducing confusion for error messages that weren't related to a statement. The full module and classname for the DBAPI-level exception is displayed, making it clear that this is a wrapped DBAPI exception. The statement and parameters themselves are bounded within a bracketed sections to better isolate them from the error message and from each other. fixes #3172
Diffstat (limited to 'test/engine/test_execute.py')
-rw-r--r--test/engine/test_execute.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py
index e0bba0afa..00b4ba7f3 100644
--- a/test/engine/test_execute.py
+++ b/test/engine/test_execute.py
@@ -285,7 +285,7 @@ class ExecuteTest(fixtures.TestBase):
def _go(conn):
assert_raises_message(
tsa.exc.StatementError,
- r"nope \(original cause: Exception: nope\) u?'SELECT 1 ",
+ r"\(exceptions.Exception\) nope \[SQL\: u?'SELECT 1 ",
conn.execute,
select([1]).
where(
@@ -1608,7 +1608,7 @@ class HandleErrorTest(fixtures.TestBase):
with engine.connect() as conn:
assert_raises_message(
tsa.exc.StatementError,
- r"nope \(original cause: Exception: nope\) u?'SELECT 1 ",
+ r"\(exceptions.Exception\) nope \[SQL\: u?'SELECT 1 ",
conn.execute,
select([1]).where(
column('foo') == literal('bar', MyType()))
@@ -1799,7 +1799,7 @@ class HandleErrorTest(fixtures.TestBase):
with engine.connect() as conn:
assert_raises_message(
tsa.exc.StatementError,
- r"nope \(original cause: Exception: nope\) u?'SELECT 1 ",
+ r"\(exceptions.Exception\) nope \[SQL\: u?'SELECT 1 ",
conn.execute,
select([1]).where(
column('foo') == literal('bar', MyType()))