diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2021-04-28 22:51:45 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-04-28 22:51:45 +0000 |
| commit | 435f5f40e87ef0ae8b52d950dd3f397b376d0fbd (patch) | |
| tree | b10550d55e378a48c7521a89364f77187bb04b44 /test/sql | |
| parent | 474b22dd7b522d0d1f543bbbf09dc9ad636dc43b (diff) | |
| parent | 029c68e636b8c635ffd35b7a38947be2e3b6e0cf (diff) | |
| download | sqlalchemy-435f5f40e87ef0ae8b52d950dd3f397b376d0fbd.tar.gz | |
Merge "ensure SelectState.all_selected_columns not memoized as a generator"
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_selectable.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index 2403db7c9..b54ef02fd 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -590,6 +590,17 @@ class SelectableTest( "table1.col3, table1.colx FROM table1) AS anon_1", ) + def test_scalar_subquery_from_subq_same_source(self): + s1 = select(table1.c.col1) + + for i in range(2): + stmt = s1.subquery().select().scalar_subquery() + self.assert_compile( + stmt, + "(SELECT anon_1.col1 FROM " + "(SELECT table1.col1 AS col1 FROM table1) AS anon_1)", + ) + def test_type_coerce_preserve_subq(self): class MyType(TypeDecorator): impl = Integer |
