From 538861143f66e7299f60b42a505242edd6351908 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 6 May 2008 00:55:49 +0000 Subject: - _Label adds itself to the proxy collection so that it works in correspoinding column. fixes some eager load with column_property bugs. - this partially fixes some issues in [ticket:1022] but leaving the "unlabeled" fix for 0.5 for now --- test/sql/selectable.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/sql/selectable.py') 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()) -- cgit v1.2.1