summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertions.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r--lib/sqlalchemy/testing/assertions.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index dfea33dc7..c0854ea55 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -497,8 +497,9 @@ class AssertsExecutionResults(object):
def assert_sql_execution(self, db, callable_, *rules):
with self.sql_execution_asserter(db) as asserter:
- callable_()
+ result = callable_()
asserter.assert_(*rules)
+ return result
def assert_sql(self, db, callable_, rules):
@@ -512,7 +513,7 @@ class AssertsExecutionResults(object):
newrule = assertsql.CompiledSQL(*rule)
newrules.append(newrule)
- self.assert_sql_execution(db, callable_, *newrules)
+ return self.assert_sql_execution(db, callable_, *newrules)
def assert_sql_count(self, db, callable_, count):
self.assert_sql_execution(