diff options
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.""" |