summaryrefslogtreecommitdiff
path: root/test/sql/selectable.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sql/selectable.py')
-rwxr-xr-xtest/sql/selectable.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/sql/selectable.py b/test/sql/selectable.py
index d3b639767..b29ba8d5c 100755
--- a/test/sql/selectable.py
+++ b/test/sql/selectable.py
@@ -174,6 +174,15 @@ class SelectableTest(TestBase, AssertsExecutionResults):
print str(j)
self.assert_(criterion.compare(j.onclause))
+ def test_labeled_select_correspoinding(self):
+ l1 = select([func.max(table.c.col1)]).label('foo')
+
+ s = select([l1])
+ assert s.corresponding_column(l1).name == s.c.foo
+
+ s = select([table.c.col1, l1])
+ assert s.corresponding_column(l1).name == s.c.foo
+
def testselectaliaslabels(self):
a = table2.select(use_labels=True).alias('a')
print str(a.select())