diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-03-12 13:35:27 -0700 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-03-12 13:35:27 -0700 |
| commit | 57868f587ee9f1e35661e8dfadc0b73740300da6 (patch) | |
| tree | d3150918249ea97076bb462ca005ea65b4e6ed89 /test/sql/test_selectable.py | |
| parent | 6c03a8ddd366b62285e2671a25a429f7bff1d052 (diff) | |
| download | sqlalchemy-57868f587ee9f1e35661e8dfadc0b73740300da6.tar.gz | |
- [bug] Fixed bug whereby a primaryjoin
condition with a "literal" in it would
raise an error on compile with certain
kinds of deeply nested expressions
which also needed to render the same
bound parameter name more than once.
[ticket:2425]
Diffstat (limited to 'test/sql/test_selectable.py')
| -rw-r--r-- | test/sql/test_selectable.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index 8f599f1d6..904819215 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -1134,3 +1134,13 @@ class AnnotationsTest(fixtures.TestBase): assert b4.left is bin.left # since column is immutable assert b4.right is not bin.right is not b2.right is not b3.right + def test_bind_unique_test(self): + t1 = table('t', column('a'), column('b')) + + b = bindparam("bind", value="x", unique=True) + + # the annotation of "b" should render the + # same. The "unique" test in compiler should + # also pass, [ticket:2425] + eq_(str(or_(b, b._annotate({"foo":"bar"}))), + ":bind_1 OR :bind_1") |
