diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-05 18:30:30 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-05 18:30:30 +0000 |
commit | 00c2077cbcddcbe22c8f356dd5b0a61a55d71186 (patch) | |
tree | dd58e75b1d6c47ea287f042a066aeaa6494f6b2a /test/sql/selectable.py | |
parent | 51726685312acd313676a8ed7a93d5d74944a746 (diff) | |
download | sqlalchemy-00c2077cbcddcbe22c8f356dd5b0a61a55d71186.tar.gz |
- oid_column proxies more intelligently off of Select, CompoundSelect - fixes platform-affected bugs in missing the correct "oid" column
- locate_all_froms() is expensive; added an attribute-level cache for it
- put a huge warning on all select.append_XXX() methods stating that derived collections like locate_all_froms() may become invalid if
already initialized
Diffstat (limited to 'test/sql/selectable.py')
-rwxr-xr-x | test/sql/selectable.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/sql/selectable.py b/test/sql/selectable.py index aa04e2936..a862b0bdf 100755 --- a/test/sql/selectable.py +++ b/test/sql/selectable.py @@ -188,6 +188,23 @@ class SelectableTest(AssertMixin): assert j4.corresponding_column(j2.c.aid) is j4.c.aid assert j4.corresponding_column(a.c.id) is j4.c.id + def test_oid(self): + # the oid column of a selectable currently proxies all + # oid columns found within. + s = table.select() + s2 = table2.select() + s3 = select([s, s2]) + assert s3.corresponding_column(table.oid_column) is s3.oid_column + assert s3.corresponding_column(table2.oid_column) is s3.oid_column + assert s3.corresponding_column(s.oid_column) is s3.oid_column + assert s3.corresponding_column(s2.oid_column) is s3.oid_column + + u = s.union(s2) + assert u.corresponding_column(table.oid_column) is u.oid_column + assert u.corresponding_column(table2.oid_column) is u.oid_column + assert u.corresponding_column(s.oid_column) is u.oid_column + assert u.corresponding_column(s2.oid_column) is u.oid_column + class PrimaryKeyTest(AssertMixin): def test_join_pk_collapse_implicit(self): """test that redundant columns in a join get 'collapsed' into a minimal primary key, |