diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-05-25 11:32:07 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-05-25 11:32:07 -0400 |
| commit | e6cbd88fe17a8ce63078b00293fbe3da2ddf9ea4 (patch) | |
| tree | fea0b0ffcbb8467258bc7e0d027bf62b4f277016 /test/sql/test_selectable.py | |
| parent | 8a4f75e9721beb93483b0ff8283ffbb0d6018ec3 (diff) | |
| download | sqlalchemy-e6cbd88fe17a8ce63078b00293fbe3da2ddf9ea4.tar.gz | |
- Fixed bug in SQLite join rewriting where anonymized column names
due to repeats would not correctly be rewritten in subqueries.
This would affect SELECT queries with any kind of subquery + join.
fixes #3057
Diffstat (limited to 'test/sql/test_selectable.py')
| -rw-r--r-- | test/sql/test_selectable.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index ed97bb37f..3ee8127b6 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -1549,6 +1549,19 @@ class AnnotationsTest(fixtures.TestBase): t = Table('t', MetaData(), c1) is_(c1_a.table, t) + def test_basic_attrs(self): + t = Table('t', MetaData(), + Column('x', Integer, info={'q': 'p'}), + Column('y', Integer, key='q')) + x_a = t.c.x._annotate({}) + y_a = t.c.q._annotate({}) + t.c.x.info['z'] = 'h' + + eq_(y_a.key, 'q') + is_(x_a.table, t) + eq_(x_a.info, {'q': 'p', 'z': 'h'}) + eq_(t.c.x.anon_label, x_a.anon_label) + def test_custom_constructions(self): from sqlalchemy.schema import Column class MyColumn(Column): |
