mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-17 06:07:27 -04:00
Merge "Correctly apply self_group in type_coerce element."
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user