diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2021-02-28 16:16:09 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-02-28 16:16:09 +0000 |
| commit | 844914bf9043a0213df2eb3358790e9975a88f4a (patch) | |
| tree | 3ee397e6d23a282ff17098a856962740f379cffe /test/sql | |
| parent | aae934d171ab0eaaa6b53db4e1db65b0d20ff1e9 (diff) | |
| parent | 0c31059a1d6303d2d16b59eb6a5c2c751acdf14a (diff) | |
| download | sqlalchemy-844914bf9043a0213df2eb3358790e9975a88f4a.tar.gz | |
Merge "support stringify for plain CTE"
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_compiler.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 9e818e997..7d1817b29 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -4323,6 +4323,17 @@ class StringifySpecialTest(fixtures.TestBase): "SELECT anon_1.myid FROM anon_1", ) + @testing.combinations(("cte",), ("alias",), ("subquery",)) + def test_grouped_selectables_print_alone(self, modifier): + stmt = select(table1).where(table1.c.myid == 10) + + grouped = getattr(stmt, modifier)() + eq_ignore_whitespace( + str(grouped), + "SELECT mytable.myid, mytable.name, " + "mytable.description FROM mytable WHERE mytable.myid = :myid_1", + ) + def test_next_sequence_value(self): # using descriptive text that is intentionally not compatible # with any particular backend, since all backends have different |
