summaryrefslogtreecommitdiff
path: root/test/sql/test_selectable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-09-07 14:55:44 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-09-07 14:55:44 -0400
commitc52580dedef89f0b94274d7e49d4f4ab099c7bc6 (patch)
tree02a4c6cdd14c504a5f9ee263c2d81d638706b42d /test/sql/test_selectable.py
parent7950270cf2b12807acd7c330b11dae36e50c3a28 (diff)
downloadsqlalchemy-ticket_3148.tar.gz
- rework ColumnAdapter and ORMAdapter to only provide the featuresticket_3148
we're now using; rework them fully so that their behavioral contract is consistent regarding adapter.traverse() vs. adapter.columns[], add a full suite of tests including advanced wrapping scenarios previously only covered by test/orm/test_froms.py and test/orm/inheritance/test_relationships.py - identify several cases where label._order_by_label_clause would be corrupted, e.g. due to adaption or annotation separately - add full tests for #3148
Diffstat (limited to 'test/sql/test_selectable.py')
-rw-r--r--test/sql/test_selectable.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py
index c5736b26f..a3b2b0e93 100644
--- a/test/sql/test_selectable.py
+++ b/test/sql/test_selectable.py
@@ -1724,6 +1724,13 @@ class AnnotationsTest(fixtures.TestBase):
b5 = visitors.cloned_traverse(b3, {}, {'binary': visit_binary})
assert str(b5) == ":bar = table1.col2"
+ def test_label_accessors(self):
+ t1 = table('t1', column('c1'))
+ l1 = t1.c.c1.label(None)
+ is_(l1._order_by_label_element, l1)
+ l1a = l1._annotate({"foo": "bar"})
+ is_(l1a._order_by_label_element, l1a)
+
def test_annotate_aliased(self):
t1 = table('t1', column('c1'))
s = select([(t1.c.c1 + 3).label('bat')])