summaryrefslogtreecommitdiff
path: root/test/sql/selectable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-12-18 05:40:06 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-12-18 05:40:06 +0000
commitfaf4aca165cef9bbd8d90b7a4f4ccf2b3d986ea1 (patch)
tree7c7f6a817a40576ae4650232c84d88b5383c98f0 /test/sql/selectable.py
parentf6068a3522bb92fac18c930eb26798fc4cb1889f (diff)
downloadsqlalchemy-faf4aca165cef9bbd8d90b7a4f4ccf2b3d986ea1.tar.gz
- cleanup; lambdas removed from properties; properties mirror same-named functions (more like eventual decorator syntax); remove some old methods, factor out some "raiseerr" ugliness to outer lying functions.
- corresponding_column() integrates "require_embedded" flag with other set arithmetic
Diffstat (limited to 'test/sql/selectable.py')
-rwxr-xr-xtest/sql/selectable.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/sql/selectable.py b/test/sql/selectable.py
index 4796288df..1b9959ec4 100755
--- a/test/sql/selectable.py
+++ b/test/sql/selectable.py
@@ -24,6 +24,7 @@ table2 = Table('table2', metadata,
class SelectableTest(AssertMixin):
def testdistance(self):
+ # same column three times
s = select([table.c.col1.label('c2'), table.c.col1, table.c.col1.label('c1')])
# didnt do this yet...col.label().make_proxy() has same "distance" as col.make_proxy() so far
@@ -50,6 +51,9 @@ class SelectableTest(AssertMixin):
def testselectontable(self):
sel = select([table, table2], use_labels=True)
assert sel.corresponding_column(table.c.col1) is sel.c.table1_col1
+ assert sel.corresponding_column(table.c.col1, require_embedded=True) is sel.c.table1_col1
+ assert table.corresponding_column(sel.c.table1_col1) is table.c.col1
+ assert table.corresponding_column(sel.c.table1_col1, require_embedded=True) is None
def testjoinagainstjoin(self):
j = outerjoin(table, table2, table.c.col1==table2.c.col2)