summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-05-23 21:21:39 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-05-23 21:21:39 +0000
commit906bb6533d900dd0bcc84007c3abe8aa0701acfd (patch)
tree9743175496f3a239e2692cc40596e7de13d5b1ec /test/sql
parenta2e8e773c5d4b564a5a7a83711ae0378e2fbc6a0 (diff)
parentd163088de1d68919b6811a25745d3becbbf5b069 (diff)
downloadsqlalchemy-906bb6533d900dd0bcc84007c3abe8aa0701acfd.tar.gz
Merge "Correctly apply self_group in type_coerce element."
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_selectable.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py
index 8fb1f2951..e509c9f95 100644
--- a/test/sql/test_selectable.py
+++ b/test/sql/test_selectable.py
@@ -439,6 +439,13 @@ class SelectableTest(
assert isinstance(stmt2.selected_columns.foo.type, MyType)
assert isinstance(subq2.c.foo.type, MyType)
+ def test_type_coerce_selfgroup(self):
+ no_group = column("a") / type_coerce(column("x"), Integer)
+ group = column("b") / type_coerce(column("y") * column("w"), Integer)
+
+ self.assert_compile(no_group, "a / x")
+ self.assert_compile(group, "b / (y * w)")
+
def test_subquery_on_table(self):
sel = select([table1, table2], use_labels=True).subquery()