diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-16 19:02:48 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-16 19:02:48 -0400 |
commit | 6a48ce44f4c271bc45ed09d7253da1f1892e6272 (patch) | |
tree | 5f7d88cf02799a79a6656af27c118f1f6c9da167 /test/sql/test_selectable.py | |
parent | 3ebb7d8e942ded31efbdb052ae3a1f08a6fc3d3d (diff) | |
download | sqlalchemy-6a48ce44f4c271bc45ed09d7253da1f1892e6272.tar.gz |
- [bug] Fixed bug whereby append_column()
wouldn't function correctly on a cloned
select() construct, courtesy
Gunnlaugur Por Briem. [ticket:2482]
Also in 0.7.8.
Diffstat (limited to 'test/sql/test_selectable.py')
-rw-r--r-- | test/sql/test_selectable.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index 66053b794..ff569288e 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -147,6 +147,13 @@ class SelectableTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled assert j2.corresponding_column(table1.c.col1) \ is j2.c.table1_col1 + def test_clone_append_column(self): + sel = select([literal_column('1').label('a')]) + cloned = visitors.ReplacingCloningVisitor().traverse(sel) + cloned.append_column(literal_column('2').label('b')) + cloned.append_column(func.foo()) + eq_(cloned.c.keys(), ['a', 'b', 'foo()']) + def test_against_cloned_non_table(self): # test that corresponding column digs across # clone boundaries with anonymous labeled elements |