diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-03-28 11:00:37 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-06-05 11:27:00 -0400 |
commit | bb6a1f690d4a749df44a1ef329b66f71205968fe (patch) | |
tree | 90aac9e592df3a769f5397f84a14b911e4cb52f1 /lib/sqlalchemy/testing/assertions.py | |
parent | 6bb97495baa640c6f03d1b50affd664cb903dee3 (diff) | |
download | sqlalchemy-bb6a1f690d4a749df44a1ef329b66f71205968fe.tar.gz |
selectin polymorphic loading
Added a new style of mapper-level inheritance loading
"polymorphic selectin". This style of loading
emits queries for each subclass in an inheritance
hierarchy subsequent to the load of the base
object type, using IN to specify the desired
primary key values.
Fixes: #3948
Change-Id: I59e071c6142354a3f95730046e3dcdfc0e2c4de5
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r-- | lib/sqlalchemy/testing/assertions.py | 5 |
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( |