From 6a48ce44f4c271bc45ed09d7253da1f1892e6272 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 16 Jun 2012 19:02:48 -0400 Subject: - [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. --- test/sql/test_selectable.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/sql/test_selectable.py') 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 -- cgit v1.2.1