diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-02-10 17:59:06 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-02-10 17:59:06 -0500 |
commit | 7d693180be8c7f9db79831351751a15d786b86a7 (patch) | |
tree | 3a75257d428db339ba85ec6b4b9203144c1e9fa5 /test/sql/test_generative.py | |
parent | 089e9ce5978d081e9cb579b0298042a0efb57edd (diff) | |
download | sqlalchemy-7d693180be8c7f9db79831351751a15d786b86a7.tar.gz |
tweak for correlated subqueries here, seems to work for test_eager_relations:CorrelatedSubqueryTest but need some more testing here
Diffstat (limited to 'test/sql/test_generative.py')
-rw-r--r-- | test/sql/test_generative.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sql/test_generative.py b/test/sql/test_generative.py index d4f324dd7..c2e437e87 100644 --- a/test/sql/test_generative.py +++ b/test/sql/test_generative.py @@ -250,6 +250,18 @@ class BinaryEndpointTraversalTest(fixtures.TestBase): ] ) + def test_subquery(self): + a, b, c = column("a"), column("b"), column("c") + subq = select([c]).where(c == a).as_scalar() + expr = and_(a == b, b == subq) + self._assert_traversal( + expr, + [ + (operators.eq, a, b), + (operators.eq, b, subq), + ] + ) + class ClauseTest(fixtures.TestBase, AssertsCompiledSQL): """test copy-in-place behavior of various ClauseElements.""" |