diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-18 01:03:31 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-18 01:03:31 -0400 |
commit | 824bd661588d6715d56f279494f98046215b394c (patch) | |
tree | c9ecda1cf81897fdaec5175cab351a385441467e /test/sql/test_selectable.py | |
parent | 515811eb582cc6d44513e19af66bf8376fd541bd (diff) | |
download | sqlalchemy-824bd661588d6715d56f279494f98046215b394c.tar.gz |
- aaaaand fix one more glitch I just thought of
Diffstat (limited to 'test/sql/test_selectable.py')
-rw-r--r-- | test/sql/test_selectable.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index 045f6695c..b81bd8e6f 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -1,7 +1,7 @@ """Test various algorithmic properties of selectables.""" from test.lib.testing import eq_, assert_raises, \ - assert_raises_message + assert_raises_message, is_ from sqlalchemy import * from test.lib import * from sqlalchemy.sql import util as sql_util, visitors @@ -348,6 +348,14 @@ class SelectableTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled criterion = a.c.table1_col1 == table2.c.col2 self.assert_(criterion.compare(j.onclause)) + def test_scalar_cloned_comparator(self): + sel = select([table1.c.col1]).as_scalar() + expr = sel == table1.c.col1 + + sel2 = visitors.ReplacingCloningVisitor().traverse(sel) + + expr2 = sel2 == table1.c.col1 + is_(expr2.left, sel2) def test_column_labels(self): a = select([table1.c.col1.label('acol1'), |